//add fcounty for Montana
// fips codes accessed here: https://www.nrcs.usda.gov/wps/portal/nrcs/detail/national/home/?cid=nrcs143_013697
gen fcounty=.
replace fcounty=1 if county=="Beaverhead" & state=="Montana"
replace fcounty=3 if county=="Big Horn" & state=="Montana"
replace fcounty=5 if county=="Blaine" & state=="Montana"
replace fcounty=7 if county=="Broadwater" & state=="Montana"
replace fcounty=9 if county=="Carbon" & state=="Montana"
replace fcounty=11 if county=="Carter" & state=="Montana"
replace fcounty=13 if county=="Cascade" & state=="Montana"
replace fcounty=15 if county=="Chouteau" & state=="Montana"
replace fcounty=17 if county=="Custer" & state=="Montana"
replace fcounty=19 if county=="Daniels" & state=="Montana"
replace fcounty=21 if county=="Dawson" & state=="Montana"
replace fcounty=23 if county=="Deer Lodge" & state=="Montana"
replace fcounty=25 if county=="Fallon" & state=="Montana"
replace fcounty=27 if county=="Fergus" & state=="Montana"
replace fcounty=29 if county=="Flathead" & state=="Montana"
replace fcounty=31 if county=="Gallatin" & state=="Montana"
replace fcounty=33 if county=="Garfield" & state=="Montana"
replace fcounty=35 if county=="Glacier" & state=="Montana"
replace fcounty=37 if county=="Golden Valley" & state=="Montana"
replace fcounty=39 if county=="Granite" & state=="Montana"
replace fcounty=41 if county=="Hill" & state=="Montana"
replace fcounty=43 if county=="Jefferson" & state=="Montana"
replace fcounty=45 if county=="Judith Basin" & state=="Montana"
replace fcounty=47 if county=="Lake" & state=="Montana"
replace fcounty=49 if county=="Lewis & Clark" & state=="Montana"
replace fcounty=51 if county=="Liberty" & state=="Montana"
replace fcounty=53 if county=="Lincoln" & state=="Montana"
replace fcounty=55 if county=="McCone" & state=="Montana"
replace fcounty=57 if county=="Madison" & state=="Montana"
replace fcounty=59 if county=="Meagher" & state=="Montana"
replace fcounty=61 if county=="Mineral" & state=="Montana"
replace fcounty=63 if county=="Missoula" & state=="Montana"
replace fcounty=65 if county=="Musselshell" & state=="Montana"
replace fcounty=67 if county=="Park" & state=="Montana"
replace fcounty=69 if county=="Petroleum" & state=="Montana"
replace fcounty=71 if county=="Phillips" & state=="Montana"
replace fcounty=73 if county=="Pondera" & state=="Montana"
replace fcounty=75 if county=="Powder River" & state=="Montana"
replace fcounty=77 if county=="Powell" & state=="Montana"
replace fcounty=79 if county=="Prairie" & state=="Montana"
replace fcounty=81 if county=="Ravalli" & state=="Montana"
replace fcounty=83 if county=="Richland" & state=="Montana"
replace fcounty=85 if county=="Roosevelt" & state=="Montana"
replace fcounty=87 if county=="Rosebud" & state=="Montana"
replace fcounty=89 if county=="Sanders" & state=="Montana"
replace fcounty=91 if county=="Sheridan" & state=="Montana"
replace fcounty=93 if county=="Silver Bow" & state=="Montana"
replace fcounty=95 if county=="Stillwater" & state=="Montana"
replace fcounty=97 if county=="Sweet Grass" & state=="Montana"
replace fcounty=99 if county=="Teton" & state=="Montana"
replace fcounty=101 if county=="Toole" & state=="Montana"
replace fcounty=103 if county=="Treasure" & state=="Montana"
replace fcounty=105 if county=="Valley" & state=="Montana"
replace fcounty=107 if county=="Wheatland" & state=="Montana"
replace fcounty=109 if county=="Wibaux" & state=="Montana"
replace fcounty=111 if county=="Yellowstone" & state=="Montana"
replace fcounty=113 if county=="Yellowstone Nat Park" & state=="Montana"



/// Use 2008 precincts, counties to fill in districts for 2010 elections

replace sldl=72 if county=="Beaverhead" & year==2010

replace sldl=42 if county=="Big Horn" & precinct=="1" & year==2010
replace sldl=41 if county=="Big Horn" & precinct=="10" & year==2010
replace sldl=41 if county=="Big Horn" & precinct=="14" & year==2010
replace sldl=42 if county=="Big Horn" & precinct=="15" & year==2010
replace sldl=42 if county=="Big Horn" & precinct=="17" & year==2010
replace sldl=42 if county=="Big Horn" & precinct=="18" & year==2010
replace sldl=41 if county=="Big Horn" & precinct=="19" & year==2010
replace sldl=42 if county=="Big Horn" & precinct=="2" & year==2010
replace sldl=42 if county=="Big Horn" & precinct=="21" & year==2010
replace sldl=41 if county=="Big Horn" & precinct=="25" & year==2010
replace sldl=41 if county=="Big Horn" & precinct=="26" & year==2010
replace sldl=42 if county=="Big Horn" & precinct=="3" & year==2010
replace sldl=41 if county=="Big Horn" & precinct=="3E" & year==2010
replace sldl=42 if county=="Big Horn" & precinct=="4" & year==2010
replace sldl=41 if county=="Big Horn" & precinct=="4E" & year==2010
replace sldl=41 if county=="Big Horn" & precinct=="5" & year==2010
replace sldl=41 if county=="Big Horn" & precinct=="6" & year==2010
replace sldl=42 if county=="Big Horn" & precinct=="7" & year==2010
replace sldl=42 if county=="Big Horn" & precinct=="8" & year==2010
replace sldl=42 if county=="Big Horn" & precinct=="9" & year==2010
replace sldl=34 if county=="Blaine" & precinct=="1" & year==2010
replace sldl=32 if county=="Blaine" & precinct=="10" & year==2010
replace sldl=34 if county=="Blaine" & precinct=="11" & year==2010
replace sldl=34 if county=="Blaine" & precinct=="13" & year==2010
replace sldl=32 if county=="Blaine" & precinct=="15" & year==2010
replace sldl=32 if county=="Blaine" & precinct=="17" & year==2010
replace sldl=32 if county=="Blaine" & precinct=="20" & year==2010
replace sldl=32 if county=="Blaine" & precinct=="3" & year==2010
replace sldl=34 if county=="Blaine" & precinct=="8" & year==2010
replace sldl=32 if county=="Blaine" & precinct=="9" & year==2010
replace sldl=68 if county=="Broadwater" & precinct=="1" & year==2010
replace sldl=83 if county=="Broadwater" & precinct=="11" & year==2010
replace sldl=68 if county=="Broadwater" & precinct=="12" & year==2010
replace sldl=68 if county=="Broadwater" & precinct=="13" & year==2010
replace sldl=68 if county=="Broadwater" & precinct=="7" & year==2010
replace sldl=57 if county=="Carbon" & precinct=="1" & year==2010
replace sldl=59 if county=="Carbon" & precinct=="10" & year==2010
replace sldl=59 if county=="Carbon" & precinct=="11" & year==2010
replace sldl=59 if county=="Carbon" & precinct=="12" & year==2010
replace sldl=60 if county=="Carbon" & precinct=="13" & year==2010
replace sldl=59 if county=="Carbon" & precinct=="14" & year==2010
replace sldl=59 if county=="Carbon" & precinct=="15" & year==2010
replace sldl=59 if county=="Carbon" & precinct=="16" & year==2010
replace sldl=59 if county=="Carbon" & precinct=="2" & year==2010
replace sldl=59 if county=="Carbon" & precinct=="3" & year==2010
replace sldl=59 if county=="Carbon" & precinct=="4" & year==2010
replace sldl=59 if county=="Carbon" & precinct=="5" & year==2010
replace sldl=59 if county=="Carbon" & precinct=="6" & year==2010
replace sldl=59 if county=="Carbon" & precinct=="7" & year==2010
replace sldl=59 if county=="Carbon" & precinct=="8" & year==2010
replace sldl=59 if county=="Carbon" & precinct=="9" & year==2010

replace sldl=39 if county=="Carter" & year==2010

replace sldl=18 if county=="Cascade" & precinct=="18A" & year==2010
replace sldl=18 if county=="Cascade" & precinct=="18B" & year==2010
replace sldl=18 if county=="Cascade" & precinct=="18C" & year==2010
replace sldl=18 if county=="Cascade" & precinct=="18D" & year==2010
replace sldl=18 if county=="Cascade" & precinct=="18E" & year==2010
replace sldl=18 if county=="Cascade" & precinct=="18F" & year==2010
replace sldl=18 if county=="Cascade" & precinct=="18G" & year==2010
replace sldl=19 if county=="Cascade" & precinct=="19A" & year==2010
replace sldl=19 if county=="Cascade" & precinct=="19B" & year==2010
replace sldl=19 if county=="Cascade" & precinct=="19C" & year==2010
replace sldl=19 if county=="Cascade" & precinct=="19D" & year==2010
replace sldl=19 if county=="Cascade" & precinct=="19E" & year==2010
replace sldl=19 if county=="Cascade" & precinct=="19F" & year==2010
replace sldl=19 if county=="Cascade" & precinct=="19G" & year==2010
replace sldl=20 if county=="Cascade" & precinct=="20A" & year==2010
replace sldl=20 if county=="Cascade" & precinct=="20B" & year==2010
replace sldl=20 if county=="Cascade" & precinct=="20C" & year==2010
replace sldl=18 if county=="Cascade" & precinct=="21A" & year==2010
replace sldl=18 if county=="Cascade" & precinct=="21B" & year==2010
replace sldl=18 if county=="Cascade" & precinct=="21C" & year==2010
replace sldl=22 if county=="Cascade" & precinct=="22A" & year==2010
replace sldl=22 if county=="Cascade" & precinct=="22B" & year==2010
replace sldl=22 if county=="Cascade" & precinct=="22C" & year==2010
replace sldl=23 if county=="Cascade" & precinct=="23A" & year==2010
replace sldl=23 if county=="Cascade" & precinct=="23B" & year==2010
replace sldl=23 if county=="Cascade" & precinct=="23C" & year==2010
replace sldl=24 if county=="Cascade" & precinct=="24A" & year==2010
replace sldl=24 if county=="Cascade" & precinct=="24B" & year==2010
replace sldl=24 if county=="Cascade" & precinct=="24C" & year==2010
replace sldl=25 if county=="Cascade" & precinct=="25A" & year==2010
replace sldl=25 if county=="Cascade" & precinct=="25B" & year==2010
replace sldl=25 if county=="Cascade" & precinct=="25C" & year==2010
replace sldl=25 if county=="Cascade" & precinct=="25D" & year==2010
replace sldl=26 if county=="Cascade" & precinct=="26A" & year==2010
replace sldl=26 if county=="Cascade" & precinct=="26B" & year==2010
replace sldl=26 if county=="Cascade" & precinct=="26C" & year==2010
replace sldl=26 if county=="Cascade" & precinct=="26D" & year==2010
replace sldl=26 if county=="Cascade" & precinct=="26E" & year==2010

replace sldl=28 if county=="Chouteau" & precinct=="1" & year==2010
replace sldl=29 if county=="Chouteau" & precinct=="10" & year==2010
replace sldl=29 if county=="Chouteau" & precinct=="11" & year==2010
replace sldl=32 if county=="Chouteau" & precinct=="12" & year==2010
replace sldl=28 if county=="Chouteau" & precinct=="2" & year==2010
replace sldl=28 if county=="Chouteau" & precinct=="3" & year==2010
replace sldl=28 if county=="Chouteau" & precinct=="4" & year==2010
replace sldl=28 if county=="Chouteau" & precinct=="5" & year==2010
replace sldl=29 if county=="Chouteau" & precinct=="6" & year==2010
replace sldl=28 if county=="Chouteau" & precinct=="7" & year==2010
replace sldl=28 if county=="Chouteau" & precinct=="8" & year==2010
replace sldl=29 if county=="Chouteau" & precinct=="9" & year==2010

replace sldl=40 if county=="Custer" & precinct=="1" & year==2010
replace sldl=39 if county=="Custer" & precinct=="10" & year==2010
replace sldl=39 if county=="Custer" & precinct=="11" & year==2010
replace sldl=39 if county=="Custer" & precinct=="12" & year==2010
replace sldl=39 if county=="Custer" & precinct=="13" & year==2010
replace sldl=39 if county=="Custer" & precinct=="14" & year==2010
replace sldl=40 if county=="Custer" & precinct=="2" & year==2010
replace sldl=40 if county=="Custer" & precinct=="3" & year==2010
replace sldl=40 if county=="Custer" & precinct=="4" & year==2010
replace sldl=45 if county=="Custer" & precinct=="5" & year==2010
replace sldl=39 if county=="Custer" & precinct=="6" & year==2010
replace sldl=45 if county=="Custer" & precinct=="7" & year==2010
replace sldl=39 if county=="Custer" & precinct=="8" & year==2010
replace sldl=39 if county=="Custer" & precinct=="9" & year==2010

replace sldl=36 if county=="Daniels" & year==2010

replace sldl=38 if county=="Dawson" & precinct=="1" & year==2010
replace sldl=38 if county=="Dawson" & precinct=="10" & year==2010
replace sldl=38 if county=="Dawson" & precinct=="2" & year==2010
replace sldl=38 if county=="Dawson" & precinct=="3" & year==2010
replace sldl=38 if county=="Dawson" & precinct=="4" & year==2010
replace sldl=37 if county=="Dawson" & precinct=="5" & year==2010
replace sldl=37 if county=="Dawson" & precinct=="6A" & year==2010
replace sldl=38 if county=="Dawson" & precinct=="6B" & year==2010
replace sldl=39 if county=="Dawson" & precinct=="6C" & year==2010
replace sldl=37 if county=="Dawson" & precinct=="7" & year==2010
replace sldl=38 if county=="Dawson" & precinct=="8" & year==2010
replace sldl=39 if county=="Dawson" & precinct=="9" & year==2010

replace sldl=85 if county=="Deer Lodge" & precinct=="1A" & year==2010
replace sldl=86 if county=="Deer Lodge" & precinct=="1" & year==2010
replace sldl=86 if county=="Deer Lodge" & precinct=="10" & year==2010
replace sldl=85 if county=="Deer Lodge" & precinct=="1A" & year==2010
replace sldl=86 if county=="Deer Lodge" & precinct=="2" & year==2010
replace sldl=85 if county=="Deer Lodge" & precinct=="2A" & year==2010
replace sldl=86 if county=="Deer Lodge" & precinct=="3" & year==2010
replace sldl=85 if county=="Deer Lodge" & precinct=="3A" & year==2010
replace sldl=86 if county=="Deer Lodge" & precinct=="4" & year==2010
replace sldl=85 if county=="Deer Lodge" & precinct=="4A" & year==2010
replace sldl=86 if county=="Deer Lodge" & precinct=="5" & year==2010
replace sldl=85 if county=="Deer Lodge" & precinct=="5A" & year==2010
replace sldl=86 if county=="Deer Lodge" & precinct=="6" & year==2010
replace sldl=85 if county=="Deer Lodge" & precinct=="6A" & year==2010
replace sldl=86 if county=="Deer Lodge" & precinct=="7" & year==2010
replace sldl=85 if county=="Deer Lodge" & precinct=="7A" & year==2010
replace sldl=85 if county=="Deer Lodge" & precinct=="8" & year==2010
replace sldl=85 if county=="Deer Lodge" & precinct=="9" & year==2010

replace sldl=39 if county=="Fallon" & year==2010

replace sldl=30 if county=="Fergus" & precinct=="10" & year==2010
replace sldl=30 if county=="Fergus" & precinct=="11" & year==2010
replace sldl=30 if county=="Fergus" & precinct=="13" & year==2010
replace sldl=30 if county=="Fergus" & precinct=="14" & year==2010
replace sldl=30 if county=="Fergus" & precinct=="15" & year==2010
replace sldl=29 if county=="Fergus" & precinct=="16" & year==2010
replace sldl=30 if county=="Fergus" & precinct=="17" & year==2010
replace sldl=29 if county=="Fergus" & precinct=="18" & year==2010
replace sldl=30 if county=="Fergus" & precinct=="2" & year==2010
replace sldl=29 if county=="Fergus" & precinct=="3" & year==2010
replace sldl=29 if county=="Fergus" & precinct=="4" & year==2010
replace sldl=30 if county=="Fergus" & precinct=="5" & year==2010
replace sldl=29 if county=="Fergus" & precinct=="6" & year==2010
replace sldl=29 if county=="Fergus" & precinct=="7" & year==2010
replace sldl=29 if county=="Fergus" & precinct=="8" & year==2010
replace sldl=30 if county=="Fergus" & precinct=="9" & year==2010

replace sldl=8 if county=="Flathead" & precinct=="1" & year==2010
replace sldl=5 if county=="Flathead" & precinct=="11" & year==2010
replace sldl=10 if county=="Flathead" & precinct=="13" & year==2010
replace sldl=3 if county=="Flathead" & precinct=="14" & year==2010
replace sldl=3 if county=="Flathead" & precinct=="16" & year==2010
replace sldl=3 if county=="Flathead" & precinct=="17" & year==2010
replace sldl=3 if county=="Flathead" & precinct=="17*" & year==2010
replace sldl=5 if county=="Flathead" & precinct=="19" & year==2010
replace sldl=8 if county=="Flathead" & precinct=="2" & year==2010
replace sldl=4 if county=="Flathead" & precinct=="20" & year==2010
replace sldl=3 if county=="Flathead" & precinct=="21" & year==2010
replace sldl=3 if county=="Flathead" & precinct=="21*" & year==2010
replace sldl=11 if county=="Flathead" & precinct=="24" & year==2010
replace sldl=7 if county=="Flathead" & precinct=="25" & year==2010
replace sldl=6 if county=="Flathead" & precinct=="26" & year==2010
replace sldl=6 if county=="Flathead" & precinct=="26*" & year==2010
replace sldl=10 if county=="Flathead" & precinct=="29" & year==2010
replace sldl=8 if county=="Flathead" & precinct=="3" & year==2010
replace sldl=6 if county=="Flathead" & precinct=="30*" & year==2010
replace sldl=8 if county=="Flathead" & precinct=="32" & year==2010
replace sldl=3 if county=="Flathead" & precinct=="33" & year==2010
replace sldl=10 if county=="Flathead" & precinct=="34" & year==2010
replace sldl=10 if county=="Flathead" & precinct=="34*" & year==2010
replace sldl=3 if county=="Flathead" & precinct=="35" & year==2010
replace sldl=6 if county=="Flathead" & precinct=="36" & year==2010
replace sldl=9 if county=="Flathead" & precinct=="38" & year==2010
replace sldl=6 if county=="Flathead" & precinct=="39" & year==2010
replace sldl=8 if county=="Flathead" & precinct=="4" & year==2010
replace sldl=7 if county=="Flathead" & precinct=="41" & year==2010
replace sldl=9 if county=="Flathead" & precinct=="42" & year==2010
replace sldl=9 if county=="Flathead" & precinct=="43" & year==2010
replace sldl=4 if county=="Flathead" & precinct=="44" & year==2010
replace sldl=6 if county=="Flathead" & precinct=="45" & year==2010
replace sldl=4 if county=="Flathead" & precinct=="46" & year==2010
replace sldl=4 if county=="Flathead" & precinct=="47" & year==2010
replace sldl=4 if county=="Flathead" & precinct=="48" & year==2010
replace sldl=6 if county=="Flathead" & precinct=="49" & year==2010
replace sldl=7 if county=="Flathead" & precinct=="50" & year==2010
replace sldl=5 if county=="Flathead" & precinct=="6" & year==2010
replace sldl=5 if county=="Flathead" & precinct=="7" & year==2010
replace sldl=5 if county=="Flathead" & precinct=="8" & year==2010
replace sldl=6 if county=="Flathead" & precinct=="89" & year==2010

replace sldl=70 if county=="Gallatin" & precinct=="1" & year==2010
replace sldl=69 if county=="Gallatin" & precinct=="10" & year==2010
replace sldl=69 if county=="Gallatin" & precinct=="11" & year==2010
replace sldl=69 if county=="Gallatin" & precinct=="12" & year==2010
replace sldl=69 if county=="Gallatin" & precinct=="13" & year==2010
replace sldl=68 if county=="Gallatin" & precinct=="14" & year==2010
replace sldl=68 if county=="Gallatin" & precinct=="15" & year==2010
replace sldl=68 if county=="Gallatin" & precinct=="16" & year==2010
replace sldl=68 if county=="Gallatin" & precinct=="17" & year==2010
replace sldl=68 if county=="Gallatin" & precinct=="18" & year==2010
replace sldl=68 if county=="Gallatin" & precinct=="19" & year==2010
replace sldl=70 if county=="Gallatin" & precinct=="2" & year==2010
replace sldl=63 if county=="Gallatin" & precinct=="20" & year==2010
replace sldl=63 if county=="Gallatin" & precinct=="21" & year==2010
replace sldl=63 if county=="Gallatin" & precinct=="22" & year==2010
replace sldl=63 if county=="Gallatin" & precinct=="23" & year==2010
replace sldl=63 if county=="Gallatin" & precinct=="24" & year==2010
replace sldl=63 if county=="Gallatin" & precinct=="25" & year==2010
replace sldl=67 if county=="Gallatin" & precinct=="26" & year==2010
replace sldl=67 if county=="Gallatin" & precinct=="27" & year==2010
replace sldl=67 if county=="Gallatin" & precinct=="28" & year==2010
replace sldl=67 if county=="Gallatin" & precinct=="29" & year==2010
replace sldl=70 if county=="Gallatin" & precinct=="3" & year==2010
replace sldl=67 if county=="Gallatin" & precinct=="30" & year==2010
replace sldl=67 if county=="Gallatin" & precinct=="31" & year==2010
replace sldl=65 if county=="Gallatin" & precinct=="32" & year==2010
replace sldl=65 if county=="Gallatin" & precinct=="33" & year==2010
replace sldl=65 if county=="Gallatin" & precinct=="34" & year==2010
replace sldl=65 if county=="Gallatin" & precinct=="35" & year==2010
replace sldl=66 if county=="Gallatin" & precinct=="36" & year==2010
replace sldl=66 if county=="Gallatin" & precinct=="37" & year==2010
replace sldl=66 if county=="Gallatin" & precinct=="38" & year==2010
replace sldl=66 if county=="Gallatin" & precinct=="39" & year==2010
replace sldl=70 if county=="Gallatin" & precinct=="4" & year==2010
replace sldl=66 if county=="Gallatin" & precinct=="40" & year==2010
replace sldl=64 if county=="Gallatin" & precinct=="41" & year==2010
replace sldl=64 if county=="Gallatin" & precinct=="42" & year==2010
replace sldl=64 if county=="Gallatin" & precinct=="43" & year==2010
replace sldl=64 if county=="Gallatin" & precinct=="44" & year==2010
replace sldl=64 if county=="Gallatin" & precinct=="45" & year==2010
replace sldl=64 if county=="Gallatin" & precinct=="46" & year==2010
replace sldl=70 if county=="Gallatin" & precinct=="5" & year==2010
replace sldl=70 if county=="Gallatin" & precinct=="6" & year==2010
replace sldl=69 if county=="Gallatin" & precinct=="7" & year==2010
replace sldl=69 if county=="Gallatin" & precinct=="8" & year==2010
replace sldl=69 if county=="Gallatin" & precinct=="9" & year==2010

replace sldl=30 if county=="Garfield" & year==2010 

replace sldl=27 if county=="Glacier" & precinct=="1" & year==2010
replace sldl=15 if county=="Glacier" & precinct=="10" & year==2010
replace sldl=16 if county=="Glacier" & precinct=="11" & year==2010
replace sldl=16 if county=="Glacier" & precinct=="12" & year==2010
replace sldl=16 if county=="Glacier" & precinct=="13" & year==2010
replace sldl=16 if county=="Glacier" & precinct=="14" & year==2010
replace sldl=16 if county=="Glacier" & precinct=="15" & year==2010
replace sldl=16 if county=="Glacier" & precinct=="19" & year==2010
replace sldl=27 if county=="Glacier" & precinct=="2" & year==2010
replace sldl=16 if county=="Glacier" & precinct=="21C" & year==2010
replace sldl=27 if county=="Glacier" & precinct=="3" & year==2010
replace sldl=27 if county=="Glacier" & precinct=="4" & year==2010
replace sldl=16 if county=="Glacier" & precinct=="5" & year==2010
replace sldl=27 if county=="Glacier" & precinct=="6" & year==2010
replace sldl=15 if county=="Glacier" & precinct=="8" & year==2010
replace sldl=16 if county=="Glacier" & precinct=="9" & year==2010

replace sldl=83 if county=="Golden Valley" & year==2010

replace sldl=86 if county=="Granite"  & year==2010

replace sldl=33 if county=="Hill" & precinct=="1" & year==2010
replace sldl=34 if county=="Hill" & precinct=="10" & year==2010
replace sldl=33 if county=="Hill" & precinct=="13" & year==2010
replace sldl=32 if county=="Hill" & precinct=="14" & year==2010
replace sldl=33 if county=="Hill" & precinct=="15" & year==2010
replace sldl=34 if county=="Hill" & precinct=="16" & year==2010
replace sldl=32 if county=="Hill" & precinct=="18" & year==2010
replace sldl=33 if county=="Hill" & precinct=="2" & year==2010
replace sldl=33 if county=="Hill" & precinct=="20" & year==2010
replace sldl=33 if county=="Hill" & precinct=="21" & year==2010
replace sldl=33 if county=="Hill" & precinct=="22" & year==2010
replace sldl=34 if county=="Hill" & precinct=="25" & year==2010
replace sldl=32 if county=="Hill" & precinct=="28" & year==2010
replace sldl=33 if county=="Hill" & precinct=="3" & year==2010
replace sldl=33 if county=="Hill" & precinct=="4" & year==2010
replace sldl=34 if county=="Hill" & precinct=="7" & year==2010
replace sldl=34 if county=="Hill" & precinct=="8" & year==2010
replace sldl=33 if county=="Hill" & precinct=="9" & year==2010

replace sldl=77 if county=="Jefferson" & precinct=="1" & year==2010
replace sldl=77 if county=="Jefferson" & precinct=="12" & year==2010
replace sldl=77 if county=="Jefferson" & precinct=="15" & year==2010
replace sldl=77 if county=="Jefferson" & precinct=="2" & year==2010
replace sldl=77 if county=="Jefferson" & precinct=="20" & year==2010
replace sldl=77 if county=="Jefferson" & precinct=="26" & year==2010
replace sldl=77 if county=="Jefferson" & precinct=="27" & year==2010
replace sldl=77 if county=="Jefferson" & precinct=="3" & year==2010
replace sldl=71 if county=="Jefferson" & precinct=="4" & year==2010
replace sldl=77 if county=="Jefferson" & precinct=="5" & year==2010
replace sldl=71 if county=="Jefferson" & precinct=="6" & year==2010
replace sldl=77 if county=="Jefferson" & precinct=="7" & year==2010
replace sldl=77 if county=="Jefferson" & precinct=="8" & year==2010
replace sldl=71 if county=="Jefferson" & precinct=="9" & year==2010

replace sldl=29 if county=="Judith Basin" & year==2010

replace sldl=11 if county=="Lake" & precinct=="1" & year==2010
replace sldl=12 if county=="Lake" & precinct=="10" & year==2010
replace sldl=12 if county=="Lake" & precinct=="11" & year==2010
replace sldl=12 if county=="Lake" & precinct=="12" & year==2010
replace sldl=9 if county=="Lake" & precinct=="13" & year==2010
replace sldl=9 if county=="Lake" & precinct=="14" & year==2010
replace sldl=9 if county=="Lake" & precinct=="15" & year==2010
replace sldl=9 if county=="Lake" & precinct=="16" & year==2010
replace sldl=15 if county=="Lake" & precinct=="17" & year==2010
replace sldl=15 if county=="Lake" & precinct=="18" & year==2010
replace sldl=15 if county=="Lake" & precinct=="19" & year==2010
replace sldl=11 if county=="Lake" & precinct=="2" & year==2010
replace sldl=15 if county=="Lake" & precinct=="20" & year==2010
replace sldl=15 if county=="Lake" & precinct=="21" & year==2010
replace sldl=15 if county=="Lake" & precinct=="22" & year==2010
replace sldl=11 if county=="Lake" & precinct=="3" & year==2010
replace sldl=11 if county=="Lake" & precinct=="4" & year==2010
replace sldl=11 if county=="Lake" & precinct=="5" & year==2010
replace sldl=11 if county=="Lake" & precinct=="6" & year==2010
replace sldl=12 if county=="Lake" & precinct=="7" & year==2010
replace sldl=12 if county=="Lake" & precinct=="8" & year==2010
replace sldl=12 if county=="Lake" & precinct=="9" & year==2010

replace sldl=82 if county=="Lewis & Clark" & precinct=="1" & year==2010
replace sldl=81 if county=="Lewis & Clark" & precinct=="10" & year==2010
replace sldl=81 if county=="Lewis & Clark" & precinct=="11" & year==2010
replace sldl=81 if county=="Lewis & Clark" & precinct=="12" & year==2010
replace sldl=80 if county=="Lewis & Clark" & precinct=="13" & year==2010
replace sldl=80 if county=="Lewis & Clark" & precinct=="14" & year==2010
replace sldl=80 if county=="Lewis & Clark" & precinct=="15" & year==2010
replace sldl=80 if county=="Lewis & Clark" & precinct=="16" & year==2010
replace sldl=79 if county=="Lewis & Clark" & precinct=="17" & year==2010
replace sldl=79 if county=="Lewis & Clark" & precinct=="18" & year==2010
replace sldl=79 if county=="Lewis & Clark" & precinct=="19" & year==2010
replace sldl=82 if county=="Lewis & Clark" & precinct=="2" & year==2010
replace sldl=79 if county=="Lewis & Clark" & precinct=="20" & year==2010
replace sldl=79 if county=="Lewis & Clark" & precinct=="21" & year==2010
replace sldl=79 if county=="Lewis & Clark" & precinct=="22" & year==2010
replace sldl=78 if county=="Lewis & Clark" & precinct=="23" & year==2010
replace sldl=78 if county=="Lewis & Clark" & precinct=="24" & year==2010
replace sldl=77 if county=="Lewis & Clark" & precinct=="25" & year==2010
replace sldl=82 if county=="Lewis & Clark" & precinct=="26" & year==2010
replace sldl=82 if county=="Lewis & Clark" & precinct=="27" & year==2010
replace sldl=82 if county=="Lewis & Clark" & precinct=="28" & year==2010
replace sldl=81 if county=="Lewis & Clark" & precinct=="29" & year==2010
replace sldl=82 if county=="Lewis & Clark" & precinct=="3" & year==2010
replace sldl=80 if county=="Lewis & Clark" & precinct=="30" & year==2010
replace sldl=80 if county=="Lewis & Clark" & precinct=="31" & year==2010
replace sldl=80 if county=="Lewis & Clark" & precinct=="32" & year==2010
replace sldl=79 if county=="Lewis & Clark" & precinct=="33" & year==2010
replace sldl=79 if county=="Lewis & Clark" & precinct=="34" & year==2010
replace sldl=84 if county=="Lewis & Clark" & precinct=="35" & year==2010
replace sldl=84 if county=="Lewis & Clark" & precinct=="36" & year==2010
replace sldl=84 if county=="Lewis & Clark" & precinct=="37" & year==2010
replace sldl=84 if county=="Lewis & Clark" & precinct=="38" & year==2010
replace sldl=84 if county=="Lewis & Clark" & precinct=="39" & year==2010
replace sldl=82 if county=="Lewis & Clark" & precinct=="4" & year==2010
replace sldl=84 if county=="Lewis & Clark" & precinct=="40" & year==2010
replace sldl=84 if county=="Lewis & Clark" & precinct=="41" & year==2010
replace sldl=84 if county=="Lewis & Clark" & precinct=="42" & year==2010
replace sldl=84 if county=="Lewis & Clark" & precinct=="43" & year==2010
replace sldl=17 if county=="Lewis & Clark" & precinct=="44" & year==2010
replace sldl=17 if county=="Lewis & Clark" & precinct=="45" & year==2010
replace sldl=17 if county=="Lewis & Clark" & precinct=="46" & year==2010
replace sldl=83 if county=="Lewis & Clark" & precinct=="47" & year==2010
replace sldl=83 if county=="Lewis & Clark" & precinct=="48" & year==2010
replace sldl=83 if county=="Lewis & Clark" & precinct=="49" & year==2010
replace sldl=77 if county=="Lewis & Clark" & precinct=="5" & year==2010
replace sldl=78 if county=="Lewis & Clark" & precinct=="50" & year==2010
replace sldl=78 if county=="Lewis & Clark" & precinct=="51" & year==2010
replace sldl=78 if county=="Lewis & Clark" & precinct=="52" & year==2010
replace sldl=78 if county=="Lewis & Clark" & precinct=="53" & year==2010
replace sldl=78 if county=="Lewis & Clark" & precinct=="54" & year==2010
replace sldl=81 if county=="Lewis & Clark" & precinct=="6" & year==2010
replace sldl=81 if county=="Lewis & Clark" & precinct=="7" & year==2010
replace sldl=81 if county=="Lewis & Clark" & precinct=="8" & year==2010
replace sldl=81 if county=="Lewis & Clark" & precinct=="9" & year==2010

replace sldl=28 if county=="Liberty" & year==2010

/// LINCOLN COUNTY PRECINCTS DO NOT MERGE, NOT EASY TO IDENTIFY ON MAP: https://leg.mt.gov/content/committees/interim/2001_2002/dist_apport/work_plans/w300libby.jpg
replace sldl=2 if county=="Lincoln" & precinct=="1" & year==2010
replace sldl=2 if county=="Lincoln" & precinct=="10" & year==2010
replace sldl=2 if county=="Lincoln" & precinct=="11" & year==2010
replace sldl=1 if county=="Lincoln" & precinct=="12" & year==2010
replace sldl=1 if county=="Lincoln" & precinct=="13" & year==2010
replace sldl=2 if county=="Lincoln" & precinct=="14" & year==2010
replace sldl=2 if county=="Lincoln" & precinct=="2" & year==2010
replace sldl=2 if county=="Lincoln" & precinct=="3" & year==2010
replace sldl=2 if county=="Lincoln" & precinct=="4" & year==2010
replace sldl=2 if county=="Lincoln" & precinct=="5" & year==2010
replace sldl=2 if county=="Lincoln" & precinct=="6" & year==2010
replace sldl=1 if county=="Lincoln" & precinct=="7" & year==2010
replace sldl=2 if county=="Lincoln" & precinct=="8" & year==2010
replace sldl=1 if county=="Lincoln" & precinct=="9" & year==2010

replace sldl=71 if county=="Madison" & year==2010

replace sldl=30 if county=="McCone" & precinct=="27" & year==2010
replace sldl=39 if county=="McCone" & precinct=="4" & year==2010
replace sldl=30 if county=="McCone" & precinct=="8" & year==2010

replace sldl=83 if county=="Meagher" & precinct=="5" & year==2010

replace sldl=14 if county=="Mineral" & year==2010

replace sldl=15 if county=="Missoula" & precinct=="1" & year==2010
replace sldl=91 if county=="Missoula" & precinct=="10" & year==2010
replace sldl=91 if county=="Missoula" & precinct=="100" & year==2010
replace sldl=91 if county=="Missoula" & precinct=="101" & year==2010
replace sldl=93 if county=="Missoula" & precinct=="11" & year==2010
replace sldl=91 if county=="Missoula" & precinct=="12" & year==2010
replace sldl=100 if county=="Missoula" & precinct=="13" & year==2010
replace sldl=100 if county=="Missoula" & precinct=="14" & year==2010
replace sldl=100 if county=="Missoula" & precinct=="15" & year==2010
replace sldl=100 if county=="Missoula" & precinct=="16" & year==2010
replace sldl=100 if county=="Missoula" & precinct=="17" & year==2010
replace sldl=100 if county=="Missoula" & precinct=="18" & year==2010
replace sldl=100 if county=="Missoula" & precinct=="19" & year==2010
replace sldl=92 if county=="Missoula" & precinct=="2" & year==2010
replace sldl=14 if county=="Missoula" & precinct=="20" & year==2010
replace sldl=96 if county=="Missoula" & precinct=="21" & year==2010
replace sldl=97 if county=="Missoula" & precinct=="22" & year==2010
replace sldl=97 if county=="Missoula" & precinct=="23" & year==2010
replace sldl=98 if county=="Missoula" & precinct=="24" & year==2010
replace sldl=100 if county=="Missoula" & precinct=="25" & year==2010
replace sldl=98 if county=="Missoula" & precinct=="26" & year==2010
replace sldl=98 if county=="Missoula" & precinct=="27" & year==2010
replace sldl=99 if county=="Missoula" & precinct=="28" & year==2010
replace sldl=98 if county=="Missoula" & precinct=="29" & year==2010
replace sldl=92 if county=="Missoula" & precinct=="3" & year==2010
replace sldl=99 if county=="Missoula" & precinct=="30" & year==2010
replace sldl=100 if county=="Missoula" & precinct=="31" & year==2010
replace sldl=98 if county=="Missoula" & precinct=="32" & year==2010
replace sldl=99 if county=="Missoula" & precinct=="33" & year==2010
replace sldl=14 if county=="Missoula" & precinct=="34" & year==2010
replace sldl=100 if county=="Missoula" & precinct=="35" & year==2010
replace sldl=14 if county=="Missoula" & precinct=="36" & year==2010
replace sldl=14 if county=="Missoula" & precinct=="37" & year==2010
replace sldl=14 if county=="Missoula" & precinct=="38" & year==2010
replace sldl=14 if county=="Missoula" & precinct=="39" & year==2010
replace sldl=92 if county=="Missoula" & precinct=="4" & year==2010
replace sldl=99 if county=="Missoula" & precinct=="40" & year==2010
replace sldl=14 if county=="Missoula" & precinct=="41" & year==2010
replace sldl=99 if county=="Missoula" & precinct=="42" & year==2010
replace sldl=93 if county=="Missoula" & precinct=="43" & year==2010
replace sldl=96 if county=="Missoula" & precinct=="44" & year==2010
replace sldl=96 if county=="Missoula" & precinct=="45" & year==2010
replace sldl=95 if county=="Missoula" & precinct=="46" & year==2010
replace sldl=94 if county=="Missoula" & precinct=="47" & year==2010
replace sldl=94 if county=="Missoula" & precinct=="48" & year==2010
replace sldl=95 if county=="Missoula" & precinct=="49" & year==2010
replace sldl=92 if county=="Missoula" & precinct=="5" & year==2010
replace sldl=95 if county=="Missoula" & precinct=="50" & year==2010
replace sldl=95 if county=="Missoula" & precinct=="51" & year==2010
replace sldl=95 if county=="Missoula" & precinct=="52" & year==2010
replace sldl=94 if county=="Missoula" & precinct=="53" & year==2010
replace sldl=94 if county=="Missoula" & precinct=="54" & year==2010
replace sldl=93 if county=="Missoula" & precinct=="55" & year==2010
replace sldl=93 if county=="Missoula" & precinct=="56" & year==2010
replace sldl=95 if county=="Missoula" & precinct=="57" & year==2010
replace sldl=94 if county=="Missoula" & precinct=="58" & year==2010
replace sldl=95 if county=="Missoula" & precinct=="59" & year==2010
replace sldl=91 if county=="Missoula" & precinct=="6" & year==2010
replace sldl=96 if county=="Missoula" & precinct=="60" & year==2010
replace sldl=96 if county=="Missoula" & precinct=="61" & year==2010
replace sldl=96 if county=="Missoula" & precinct=="62" & year==2010
replace sldl=95 if county=="Missoula" & precinct=="63" & year==2010
replace sldl=97 if county=="Missoula" & precinct=="64" & year==2010
replace sldl=97 if county=="Missoula" & precinct=="65" & year==2010
replace sldl=97 if county=="Missoula" & precinct=="66" & year==2010
replace sldl=96 if county=="Missoula" & precinct=="67" & year==2010
replace sldl=97 if county=="Missoula" & precinct=="68" & year==2010
replace sldl=98 if county=="Missoula" & precinct=="69" & year==2010
replace sldl=92 if county=="Missoula" & precinct=="7" & year==2010
replace sldl=97 if county=="Missoula" & precinct=="70" & year==2010
replace sldl=92 if county=="Missoula" & precinct=="71" & year==2010
replace sldl=98 if county=="Missoula" & precinct=="72" & year==2010
replace sldl=98 if county=="Missoula" & precinct=="73" & year==2010
replace sldl=98 if county=="Missoula" & precinct=="74" & year==2010
replace sldl=97 if county=="Missoula" & precinct=="75" & year==2010
replace sldl=93 if county=="Missoula" & precinct=="76" & year==2010
replace sldl=93 if county=="Missoula" & precinct=="77" & year==2010
replace sldl=95 if county=="Missoula" & precinct=="78" & year==2010
replace sldl=96 if county=="Missoula" & precinct=="79" & year==2010
replace sldl=91 if county=="Missoula" & precinct=="8" & year==2010
replace sldl=96 if county=="Missoula" & precinct=="80" & year==2010
replace sldl=94 if county=="Missoula" & precinct=="81" & year==2010
replace sldl=93 if county=="Missoula" & precinct=="82" & year==2010
replace sldl=93 if county=="Missoula" & precinct=="83" & year==2010
replace sldl=94 if county=="Missoula" & precinct=="84" & year==2010
replace sldl=94 if county=="Missoula" & precinct=="85" & year==2010
replace sldl=98 if county=="Missoula" & precinct=="86" & year==2010
replace sldl=94 if county=="Missoula" & precinct=="87" & year==2010
replace sldl=99 if county=="Missoula" & precinct=="88" & year==2010
replace sldl=98 if county=="Missoula" & precinct=="89" & year==2010
replace sldl=91 if county=="Missoula" & precinct=="9" & year==2010
replace sldl=99 if county=="Missoula" & precinct=="90" & year==2010
replace sldl=91 if county=="Missoula" & precinct=="91" & year==2010
replace sldl=99 if county=="Missoula" & precinct=="92" & year==2010
replace sldl=99 if county=="Missoula" & precinct=="93" & year==2010
replace sldl=92 if county=="Missoula" & precinct=="94" & year==2010
replace sldl=92 if county=="Missoula" & precinct=="95" & year==2010
replace sldl=92 if county=="Missoula" & precinct=="96" & year==2010
replace sldl=92 if county=="Missoula" & precinct=="97" & year==2010
replace sldl=92 if county=="Missoula" & precinct=="98" & year==2010
replace sldl=92 if county=="Missoula" & precinct=="99" & year==2010

replace sldl=45 if county=="Musselshell" & precinct=="1" & year==2010
replace sldl=45 if county=="Musselshell" & precinct=="3" & year==2010
replace sldl=45 if county=="Musselshell" & precinct=="5" & year==2010
replace sldl=45 if county=="Musselshell" & precinct=="6" & year==2010
replace sldl=45 if county=="Musselshell" & precinct=="7" & year==2010
replace sldl=45 if county=="Musselshell" & precinct=="8" & year==2010

replace sldl=61 if county=="Park" & precinct=="1 HD61" & year==2010
replace sldl=62 if county=="Park" & precinct=="1 HD62" & year==2010

replace sldl=62 if county=="Park" & precinct=="1" & year==2010
replace sldl=62 if county=="Park" & precinct=="2" & year==2010
replace sldl=62 if county=="Park" & precinct=="2B" & year==2010
replace sldl=62 if county=="Park" & precinct=="3" & year==2010
replace sldl=62 if county=="Park" & precinct=="4" & year==2010
replace sldl=61 if county=="Park" & precinct=="5A" & year==2010
replace sldl=61 if county=="Park" & precinct=="5B" & year==2010
replace sldl=61 if county=="Park" & precinct=="5C" & year==2010
replace sldl=61 if county=="Park" & precinct=="5D" & year==2010
replace sldl=61 if county=="Park" & precinct=="6A" & year==2010
replace sldl=61 if county=="Park" & precinct=="6B" & year==2010
replace sldl=61 if county=="Park" & precinct=="7A" & year==2010
replace sldl=61 if county=="Park" & precinct=="7B" & year==2010
replace sldl=61 if county=="Park" & precinct=="7C" & year==2010
replace sldl=61 if county=="Park" & precinct=="7D" & year==2010

replace sldl=30 if county=="Petroleum" & precinct=="1" & year==2010

replace sldl=32 if county=="Phillips" & strpos(precinct,"32")!=0
replace sldl=35 if county=="Phillips" & strpos(precinct,"35")!=0

replace sldl=32 if county=="Phillips" & strpos(precinct,"5 - ")!=0 & year==2010
replace sldl=32 if county=="Phillips" & strpos(precinct,"6 - ")!=0 & year==2010
replace sldl=35 if county=="Phillips" & strpos(precinct,"7 - ")!=0 & year==2010

replace sldl=35 if county=="Phillips" & strpos(precinct,"9-")!=0 & year==2010


replace sldl=32 if county=="Phillips" & strpos(precinct,"11 - ")!=0 & year==2010
replace sldl=35 if county=="Phillips" & precinct=="12-N" & year==2010
replace sldl=32 if county=="Phillips" & precinct=="12-S" & year==2010
replace sldl=35 if county=="Phillips" & strpos(precinct,"16 - ")!=0 & year==2010



replace sldl=27 if county=="Pondera" & precinct=="19" & year==2010
replace sldl=15 if county=="Pondera" & precinct=="20" & year==2010
replace sldl=27 if county=="Pondera" & precinct=="23" & year==2010
replace sldl=27 if county=="Pondera" & precinct=="24" & year==2010
replace sldl=27 if county=="Pondera" & precinct=="27" & year==2010
replace sldl=27 if county=="Pondera" & precinct=="28" & year==2010
replace sldl=27 if county=="Pondera" & precinct=="34" & year==2010
replace sldl=27 if county=="Pondera" & precinct=="35" & year==2010

replace sldl=39 if county=="Powder River" & precinct=="1" & year==2010
replace sldl=39 if county=="Powder River" & precinct=="11" & year==2010
replace sldl=39 if county=="Powder River" & precinct=="12" & year==2010
replace sldl=39 if county=="Powder River" & precinct=="3" & year==2010
replace sldl=41 if county=="Powder River" & precinct=="4" & year==2010
replace sldl=41 if county=="Powder River" & precinct=="5" & year==2010
replace sldl=39 if county=="Powder River" & precinct=="7" & year==2010
replace sldl=39 if county=="Powder River" & precinct=="9" & year==2010

replace sldl=84 if county=="Powell" & precinct=="1" & year==2010
replace sldl=84 if county=="Powell" & precinct=="10" & year==2010
replace sldl=84 if county=="Powell" & precinct=="11" & year==2010
replace sldl=17 if county=="Powell" & precinct=="12" & year==2010
replace sldl=84 if county=="Powell" & precinct=="12_84" & year==2010
replace sldl=17 if county=="Powell" & precinct=="14" & year==2010
replace sldl=84 if county=="Powell" & precinct=="14_84" & year==2010
replace sldl=84 if county=="Powell" & precinct=="16_84" & year==2010
replace sldl=85 if county=="Powell" & precinct=="16" & year==2010
replace sldl=84 if county=="Powell" & precinct=="3_84" & year==2010
replace sldl=85 if county=="Powell" & precinct=="3" & year==2010
replace sldl=85 if county=="Powell" & precinct=="4" & year==2010
replace sldl=85 if county=="Powell" & precinct=="5" & year==2010
replace sldl=85 if county=="Powell" & precinct=="6" & year==2010
replace sldl=85 if county=="Powell" & precinct=="7" & year==2010
replace sldl=84 if county=="Powell" & precinct=="8" & year==2010

replace sldl=39 if county=="Prairie" & year==2010

replace sldl=87 if county=="Ravalli" & precinct=="1" & year==2010
replace sldl=87 if county=="Ravalli" & precinct=="10" & year==2010
replace sldl=88 if county=="Ravalli" & precinct=="11" & year==2010
replace sldl=89 if county=="Ravalli" & precinct=="12" & year==2010
replace sldl=87 if county=="Ravalli" & precinct=="13" & year==2010
replace sldl=87 if county=="Ravalli" & precinct=="14" & year==2010
replace sldl=89 if county=="Ravalli" & precinct=="15" & year==2010
replace sldl=89 if county=="Ravalli" & precinct=="16" & year==2010
replace sldl=90 if county=="Ravalli" & precinct=="17" & year==2010
replace sldl=90 if county=="Ravalli" & precinct=="18" & year==2010
replace sldl=89 if county=="Ravalli" & precinct=="19" & year==2010
replace sldl=87 if county=="Ravalli" & precinct=="2" & year==2010
replace sldl=90 if county=="Ravalli" & precinct=="20" & year==2010
replace sldl=90 if county=="Ravalli" & precinct=="21" & year==2010
replace sldl=90 if county=="Ravalli" & precinct=="22" & year==2010
replace sldl=87 if county=="Ravalli" & precinct=="3" & year==2010
replace sldl=87 if county=="Ravalli" & precinct=="4" & year==2010
replace sldl=87 if county=="Ravalli" & precinct=="5" & year==2010
replace sldl=87 if county=="Ravalli" & precinct=="6" & year==2010
replace sldl=88 if county=="Ravalli" & precinct=="7" & year==2010
replace sldl=88 if county=="Ravalli" & precinct=="8" & year==2010
replace sldl=88 if county=="Ravalli" & precinct=="9" & year==2010

replace sldl=37 if county=="Richland" & precinct=="1" & year==2010
replace sldl=36 if county=="Richland" & precinct=="12A" & year==2010
replace sldl=37 if county=="Richland" & precinct=="12B" & year==2010
replace sldl=36 if county=="Richland" & precinct=="17" & year==2010
replace sldl=36 if county=="Richland" & precinct=="19" & year==2010
replace sldl=37 if county=="Richland" & precinct=="2" & year==2010
replace sldl=37 if county=="Richland" & precinct=="22" & year==2010
replace sldl=37 if county=="Richland" & precinct=="23" & year==2010
replace sldl=37 if county=="Richland" & precinct=="3" & year==2010
replace sldl=37 if county=="Richland" & precinct=="4" & year==2010
replace sldl=37 if county=="Richland" & precinct=="5" & year==2010
replace sldl=36 if county=="Richland" & precinct=="7A" & year==2010
replace sldl=37 if county=="Richland" & precinct=="7B" & year==2010
replace sldl=37 if county=="Richland" & precinct=="8" & year==2010
replace sldl=37 if county=="Richland" & precinct=="9" & year==2010

replace sldl=36 if county=="Roosevelt" & precinct=="10" & year==2010
replace sldl=36 if county=="Roosevelt" & precinct=="12" & year==2010
replace sldl=31 if county=="Roosevelt" & precinct=="15" & year==2010
replace sldl=31 if county=="Roosevelt" & precinct=="16" & year==2010
replace sldl=36 if county=="Roosevelt" & precinct=="17" & year==2010
replace sldl=31 if county=="Roosevelt" & precinct=="18" & year==2010
replace sldl=36 if county=="Roosevelt" & precinct=="2" & year==2010
replace sldl=36 if county=="Roosevelt" & precinct=="20" & year==2010
replace sldl=31 if county=="Roosevelt" & precinct=="22" & year==2010
replace sldl=31 if county=="Roosevelt" & precinct=="24" & year==2010
replace sldl=31 if county=="Roosevelt" & precinct=="26" & year==2010
replace sldl=31 if county=="Roosevelt" & precinct=="27" & year==2010
replace sldl=36 if county=="Roosevelt" & precinct=="28" & year==2010

replace sldl=45 if county=="Rosebud" & precinct=="10" & year==2010
replace sldl=43 if county=="Rosebud" & precinct=="11" & year==2010
replace sldl=41 if county=="Rosebud" & precinct=="15" & year==2010
replace sldl=41 if county=="Rosebud" & precinct=="17" & year==2010
replace sldl=45 if county=="Rosebud" & precinct=="20" & year==2010
replace sldl=43 if county=="Rosebud" & precinct=="21" & year==2010
replace sldl=45 if county=="Rosebud" & precinct=="26" & year==2010
replace sldl=43 if county=="Rosebud" & precinct=="3" & year==2010
replace sldl=41 if county=="Rosebud" & precinct=="30" & year==2010
replace sldl=43 if county=="Rosebud" & precinct=="32" & year==2010
replace sldl=43 if county=="Rosebud" & precinct=="6" & year==2010
replace sldl=41 if county=="Rosebud" & precinct=="7" & year==2010

replace sldl=13 if county=="Sanders" & year==2010 
replace sldl=14 if county=="Sanders" & year==2010 & precinct=="PARADISE 14"


replace sldl=36 if county=="Sheridan" & year==2010

replace sldl=76 if county=="Silver Bow" & (precinct=="10E" | precinct=="10N" | precinct=="10S") & year==2010
replace sldl=76 if county=="Silver Bow" & precinct=="11C" & year==2010
replace sldl=76 if county=="Silver Bow" & precinct=="12C" & year==2010
replace sldl=76 if county=="Silver Bow" & (precinct=="13N" | precinct=="13S") & year==2010
replace sldl=76 if county=="Silver Bow" & precinct=="14C" & year==2010
replace sldl=76 if county=="Silver Bow" & (precinct=="15S" | precinct=="15N") & year==2010
replace sldl=73 if county=="Silver Bow" & (precinct=="16E" | precinct=="16W") & year==2010
replace sldl=76 if county=="Silver Bow" & precinct=="17C" & year==2010
replace sldl=75 if county=="Silver Bow" & precinct=="18C" & year==2010
replace sldl=73 if county=="Silver Bow" & (precinct=="19N" | precinct=="19S") & year==2010
replace sldl=75 if county=="Silver Bow" & precinct=="1C" & year==2010
replace sldl=74 if county=="Silver Bow" & (precinct=="20S" | precinct=="20N") & year==2010
replace sldl=75 if county=="Silver Bow" & precinct=="21C" & year==2010
replace sldl=73 if county=="Silver Bow" & precinct=="22C" & year==2010
replace sldl=73 if county=="Silver Bow" & (precinct=="23S" | precinct=="23N") & year==2010
replace sldl=73 if county=="Silver Bow" & (precinct=="24S" | precinct=="24N") & year==2010
replace sldl=76 if county=="Silver Bow" & precinct=="25C" & year==2010
replace sldl=73 if county=="Silver Bow" & (precinct=="26E" | precinct=="26W") & year==2010
replace sldl=76 if county=="Silver Bow" & precinct=="27N" & year==2010
replace sldl=73 if county=="Silver Bow" & precinct=="27S" & year==2010
replace sldl=73 if county=="Silver Bow" & precinct=="28C" & year==2010
replace sldl=73 if county=="Silver Bow" & precinct=="29C" & year==2010
replace sldl=75 if county=="Silver Bow" & precinct=="2C" & year==2010
replace sldl=75 if county=="Silver Bow" & precinct=="3C" & year==2010
replace sldl=75 if county=="Silver Bow" & precinct=="4C" & year==2010
replace sldl=74 if county=="Silver Bow" & precinct=="5C" & year==2010
replace sldl=74 if county=="Silver Bow" & precinct=="6C" & year==2010
replace sldl=74 if county=="Silver Bow" & (precinct=="7N" | precinct=="7S") & year==2010
replace sldl=74 if county=="Silver Bow" & (precinct=="8E" |  precinct=="8W" )& year==2010
replace sldl=74 if county=="Silver Bow" & (precinct=="9E" | precinct=="9W"  )& year==2010
replace sldl=75 if county=="Silver Bow" & precinct=="9N" & year==2010

replace sldl=60 if county=="Stillwater" & precinct=="1" & year==2010
replace sldl=60 if county=="Stillwater" & precinct=="10" & year==2010
replace sldl=60 if county=="Stillwater" & precinct=="11" & year==2010
replace sldl=60 if county=="Stillwater" & precinct=="13" & year==2010
replace sldl=60 if county=="Stillwater" & precinct=="2" & year==2010
replace sldl=60 if county=="Stillwater" & precinct=="4" & year==2010
replace sldl=60 if county=="Stillwater" & precinct=="7" & year==2010
replace sldl=60 if county=="Stillwater" & precinct=="9" & year==2010

replace sldl=61 if county=="Sweet Grass" & precinct=="1" & year==2010
replace sldl=61 if county=="Sweet Grass" & precinct=="2" & year==2010
replace sldl=61 if county=="Sweet Grass" & precinct=="3" & year==2010
replace sldl=61 if county=="Sweet Grass" & precinct=="4" & year==2010
replace sldl=60 if county=="Sweet Grass" & precinct=="5" & year==2010

replace sldl=17 if county=="Teton" & year==2010

replace sldl=27 if county=="Toole" & precinct=="DG4_HD027" & year==2010
replace sldl=28 if county=="Toole" & precinct=="DEVON-GALATA" & year==2010
replace sldl=16 if county=="Toole" & precinct=="KEVIN CITY" & year==2010
replace sldl=16 if county=="Toole" & precinct=="KEVIN 3" & year==2010
replace sldl=28 if county=="Toole" & precinct=="SHELBY 1" & year==2010
replace sldl=27 if county=="Toole" & precinct=="SH6_HD027" & year==2010
replace sldl=28 if county=="Toole" & precinct=="SHELBY RURAL" & year==2010
replace sldl=16 if county=="Toole" & precinct=="SUNBURST CITY" & year==2010
replace sldl=16 if county=="Toole" & precinct=="SU3_HD16" & year==2010
replace sldl=28 if county=="Toole" & precinct=="SUNBURST 3" & year==2010


replace sldl=43 if county=="Treasure"  & year==2010

replace sldl=35 if county=="Valley" & precinct=="1" & year==2010
replace sldl=35 if county=="Valley" & precinct=="10" & year==2010
replace sldl=31 if county=="Valley" & precinct=="11" & year==2010
replace sldl=35 if county=="Valley" & precinct=="2" & year==2010
replace sldl=35 if county=="Valley" & precinct=="3" & year==2010
replace sldl=35 if county=="Valley" & precinct=="4" & year==2010
replace sldl=31 if county=="Valley" & precinct=="5" & year==2010
replace sldl=35 if county=="Valley" & precinct=="6" & year==2010
replace sldl=32 if county=="Valley" & precinct=="7" & year==2010
replace sldl=35 if county=="Valley" & precinct=="8" & year==2010
replace sldl=35 if county=="Valley" & precinct=="9" & year==2010

replace sldl=83 if county=="Wheatland" & year==2010

replace sldl=38 if county=="Wibaux" & precinct=="1" & year==2010

replace sldl=42 if county=="Yellowstone" & precinct=="1" & year==2010
replace sldl=46 if county=="Yellowstone" & precinct=="10" & year==2010
replace sldl=46 if county=="Yellowstone" & precinct=="11" & year==2010
replace sldl=46 if county=="Yellowstone" & precinct=="12" & year==2010
replace sldl=46 if county=="Yellowstone" & precinct=="13" & year==2010
replace sldl=46 if county=="Yellowstone" & precinct=="14" & year==2010
replace sldl=46 if county=="Yellowstone" & precinct=="15" & year==2010
replace sldl=46 if county=="Yellowstone" & precinct=="16" & year==2010
replace sldl=46 if county=="Yellowstone" & precinct=="17" & year==2010
replace sldl=47 if county=="Yellowstone" & precinct=="18" & year==2010
replace sldl=47 if county=="Yellowstone" & precinct=="19" & year==2010
replace sldl=43 if county=="Yellowstone" & precinct=="2" & year==2010
replace sldl=47 if county=="Yellowstone" & precinct=="20" & year==2010
replace sldl=48 if county=="Yellowstone" & precinct=="21" & year==2010
replace sldl=48 if county=="Yellowstone" & precinct=="22" & year==2010
replace sldl=48 if county=="Yellowstone" & precinct=="23" & year==2010
replace sldl=49 if county=="Yellowstone" & precinct=="24" & year==2010
replace sldl=49 if county=="Yellowstone" & precinct=="25" & year==2010
replace sldl=49 if county=="Yellowstone" & precinct=="26" & year==2010
replace sldl=50 if county=="Yellowstone" & precinct=="27" & year==2010
replace sldl=50 if county=="Yellowstone" & precinct=="28" & year==2010
replace sldl=50 if county=="Yellowstone" & precinct=="29" & year==2010
replace sldl=43 if county=="Yellowstone" & precinct=="3" & year==2010
replace sldl=50 if county=="Yellowstone" & precinct=="30" & year==2010
replace sldl=51 if county=="Yellowstone" & precinct=="31" & year==2010
replace sldl=51 if county=="Yellowstone" & precinct=="32" & year==2010
replace sldl=51 if county=="Yellowstone" & precinct=="33" & year==2010
replace sldl=51 if county=="Yellowstone" & precinct=="34" & year==2010
replace sldl=52 if county=="Yellowstone" & precinct=="35" & year==2010
replace sldl=52 if county=="Yellowstone" & precinct=="36" & year==2010
replace sldl=52 if county=="Yellowstone" & precinct=="37" & year==2010
replace sldl=52 if county=="Yellowstone" & precinct=="38" & year==2010
replace sldl=52 if county=="Yellowstone" & precinct=="39" & year==2010
replace sldl=43 if county=="Yellowstone" & precinct=="4" & year==2010
replace sldl=53 if county=="Yellowstone" & precinct=="40" & year==2010
replace sldl=53 if county=="Yellowstone" & precinct=="41" & year==2010
replace sldl=53 if county=="Yellowstone" & precinct=="42" & year==2010
replace sldl=53 if county=="Yellowstone" & precinct=="43" & year==2010
replace sldl=53 if county=="Yellowstone" & precinct=="44" & year==2010
replace sldl=53 if county=="Yellowstone" & precinct=="45" & year==2010
replace sldl=54 if county=="Yellowstone" & precinct=="46" & year==2010
replace sldl=54 if county=="Yellowstone" & precinct=="47" & year==2010
replace sldl=54 if county=="Yellowstone" & precinct=="48" & year==2010
replace sldl=54 if county=="Yellowstone" & precinct=="49" & year==2010
replace sldl=44 if county=="Yellowstone" & precinct=="5" & year==2010
replace sldl=55 if county=="Yellowstone" & precinct=="50" & year==2010
replace sldl=55 if county=="Yellowstone" & precinct=="51" & year==2010
replace sldl=55 if county=="Yellowstone" & precinct=="52" & year==2010
replace sldl=55 if county=="Yellowstone" & precinct=="53" & year==2010
replace sldl=55 if county=="Yellowstone" & precinct=="54" & year==2010
replace sldl=56 if county=="Yellowstone" & precinct=="55" & year==2010
replace sldl=56 if county=="Yellowstone" & precinct=="56" & year==2010
replace sldl=56 if county=="Yellowstone" & precinct=="57" & year==2010
replace sldl=56 if county=="Yellowstone" & precinct=="58" & year==2010
replace sldl=57 if county=="Yellowstone" & precinct=="59" & year==2010
replace sldl=44 if county=="Yellowstone" & precinct=="6" & year==2010
replace sldl=57 if county=="Yellowstone" & precinct=="60" & year==2010
replace sldl=57 if county=="Yellowstone" & precinct=="61" & year==2010
replace sldl=57 if county=="Yellowstone" & precinct=="62" & year==2010
replace sldl=57 if county=="Yellowstone" & precinct=="63" & year==2010
replace sldl=57 if county=="Yellowstone" & precinct=="64" & year==2010
replace sldl=58 if county=="Yellowstone" & precinct=="65" & year==2010
replace sldl=58 if county=="Yellowstone" & precinct=="66" & year==2010
replace sldl=58 if county=="Yellowstone" & precinct=="67" & year==2010
replace sldl=58 if county=="Yellowstone" & precinct=="68" & year==2010
replace sldl=58 if county=="Yellowstone" & precinct=="69" & year==2010
replace sldl=44 if county=="Yellowstone" & precinct=="7" & year==2010
replace sldl=45 if county=="Yellowstone" & precinct=="8" & year==2010
replace sldl=46 if county=="Yellowstone" & precinct=="9" & year==2010

replace sldu=36 if county=="Beaverhead" & precinct=="1" & year==2010
replace sldu=36 if county=="Beaverhead" & precinct=="12" & year==2010
replace sldu=36 if county=="Beaverhead" & precinct=="14" & year==2010
replace sldu=36 if county=="Beaverhead" & precinct=="17" & year==2010
replace sldu=36 if county=="Beaverhead" & precinct=="19" & year==2010
replace sldu=36 if county=="Beaverhead" & precinct=="2" & year==2010
replace sldu=36 if county=="Beaverhead" & precinct=="20" & year==2010
replace sldu=36 if county=="Beaverhead" & precinct=="21" & year==2010
replace sldu=36 if county=="Beaverhead" & precinct=="23" & year==2010
replace sldu=36 if county=="Beaverhead" & precinct=="3" & year==2010
replace sldu=36 if county=="Beaverhead" & precinct=="4" & year==2010
replace sldu=36 if county=="Beaverhead" & precinct=="5" & year==2010
replace sldu=36 if county=="Beaverhead" & precinct=="6" & year==2010
replace sldu=36 if county=="Beaverhead" & precinct=="7" & year==2010
replace sldu=36 if county=="Beaverhead" & precinct=="8" & year==2010
replace sldu=36 if county=="Beaverhead" & precinct=="9" & year==2010
replace sldu=21 if county=="Big Horn" & precinct=="1" & year==2010
replace sldu=21 if county=="Big Horn" & precinct=="10" & year==2010
replace sldu=21 if county=="Big Horn" & precinct=="14" & year==2010
replace sldu=21 if county=="Big Horn" & precinct=="15" & year==2010
replace sldu=21 if county=="Big Horn" & precinct=="17" & year==2010
replace sldu=21 if county=="Big Horn" & precinct=="18" & year==2010
replace sldu=21 if county=="Big Horn" & precinct=="19" & year==2010
replace sldu=21 if county=="Big Horn" & precinct=="2" & year==2010
replace sldu=21 if county=="Big Horn" & precinct=="21" & year==2010
replace sldu=21 if county=="Big Horn" & precinct=="25" & year==2010
replace sldu=21 if county=="Big Horn" & precinct=="26" & year==2010
replace sldu=21 if county=="Big Horn" & precinct=="3" & year==2010
replace sldu=21 if county=="Big Horn" & precinct=="3E" & year==2010
replace sldu=21 if county=="Big Horn" & precinct=="4" & year==2010
replace sldu=21 if county=="Big Horn" & precinct=="4E" & year==2010
replace sldu=21 if county=="Big Horn" & precinct=="5" & year==2010
replace sldu=21 if county=="Big Horn" & precinct=="6" & year==2010
replace sldu=21 if county=="Big Horn" & precinct=="7" & year==2010
replace sldu=21 if county=="Big Horn" & precinct=="8" & year==2010
replace sldu=21 if county=="Big Horn" & precinct=="9" & year==2010
replace sldu=17 if county=="Blaine" & precinct=="1" & year==2010
replace sldu=16 if county=="Blaine" & precinct=="10" & year==2010
replace sldu=17 if county=="Blaine" & precinct=="11" & year==2010
replace sldu=17 if county=="Blaine" & precinct=="13" & year==2010
replace sldu=16 if county=="Blaine" & precinct=="15" & year==2010
replace sldu=16 if county=="Blaine" & precinct=="17" & year==2010
replace sldu=16 if county=="Blaine" & precinct=="20" & year==2010
replace sldu=16 if county=="Blaine" & precinct=="3" & year==2010
replace sldu=17 if county=="Blaine" & precinct=="8" & year==2010
replace sldu=16 if county=="Blaine" & precinct=="9" & year==2010
replace sldu=34 if county=="Broadwater" & precinct=="1" & year==2010
replace sldu=42 if county=="Broadwater" & precinct=="11" & year==2010
replace sldu=34 if county=="Broadwater" & precinct=="12" & year==2010
replace sldu=34 if county=="Broadwater" & precinct=="13" & year==2010
replace sldu=34 if county=="Broadwater" & precinct=="7" & year==2010
replace sldu=29 if county=="Carbon" & precinct=="1" & year==2010
replace sldu=30 if county=="Carbon" & precinct=="10" & year==2010
replace sldu=30 if county=="Carbon" & precinct=="11" & year==2010
replace sldu=30 if county=="Carbon" & precinct=="12" & year==2010
replace sldu=30 if county=="Carbon" & precinct=="13" & year==2010
replace sldu=30 if county=="Carbon" & precinct=="14" & year==2010
replace sldu=30 if county=="Carbon" & precinct=="15" & year==2010
replace sldu=30 if county=="Carbon" & precinct=="16" & year==2010
replace sldu=30 if county=="Carbon" & precinct=="2" & year==2010
replace sldu=30 if county=="Carbon" & precinct=="3" & year==2010
replace sldu=30 if county=="Carbon" & precinct=="4" & year==2010
replace sldu=30 if county=="Carbon" & precinct=="5" & year==2010
replace sldu=30 if county=="Carbon" & precinct=="6" & year==2010
replace sldu=30 if county=="Carbon" & precinct=="7" & year==2010
replace sldu=30 if county=="Carbon" & precinct=="8" & year==2010
replace sldu=30 if county=="Carbon" & precinct=="9" & year==2010
replace sldu=20 if county=="Carter" & precinct=="1" & year==2010
replace sldu=20 if county=="Carter" & precinct=="13" & year==2010
replace sldu=20 if county=="Carter" & precinct=="14" & year==2010
replace sldu=20 if county=="Carter" & precinct=="3" & year==2010
replace sldu=9 if county=="Cascade" & precinct=="18A" & year==2010
replace sldu=9 if county=="Cascade" & precinct=="18B" & year==2010
replace sldu=9 if county=="Cascade" & precinct=="18C" & year==2010
replace sldu=9 if county=="Cascade" & precinct=="18D" & year==2010
replace sldu=9 if county=="Cascade" & precinct=="18E" & year==2010
replace sldu=9 if county=="Cascade" & precinct=="18F" & year==2010
replace sldu=9 if county=="Cascade" & precinct=="18G" & year==2010
replace sldu=10 if county=="Cascade" & precinct=="19A" & year==2010
replace sldu=10 if county=="Cascade" & precinct=="19B" & year==2010
replace sldu=10 if county=="Cascade" & precinct=="19C" & year==2010
replace sldu=10 if county=="Cascade" & precinct=="19D" & year==2010
replace sldu=10 if county=="Cascade" & precinct=="19E" & year==2010
replace sldu=10 if county=="Cascade" & precinct=="19F" & year==2010
replace sldu=10 if county=="Cascade" & precinct=="19G" & year==2010
replace sldu=10 if county=="Cascade" & precinct=="20A" & year==2010
replace sldu=10 if county=="Cascade" & precinct=="20B" & year==2010
replace sldu=10 if county=="Cascade" & precinct=="20C" & year==2010
replace sldu=9 if county=="Cascade" & precinct=="21A" & year==2010
replace sldu=9 if county=="Cascade" & precinct=="21B" & year==2010
replace sldu=9 if county=="Cascade" & precinct=="21C" & year==2010
replace sldu=11 if county=="Cascade" & precinct=="22A" & year==2010
replace sldu=11 if county=="Cascade" & precinct=="22B" & year==2010
replace sldu=11 if county=="Cascade" & precinct=="22C" & year==2010
replace sldu=12 if county=="Cascade" & precinct=="23A" & year==2010
replace sldu=12 if county=="Cascade" & precinct=="23B" & year==2010
replace sldu=12 if county=="Cascade" & precinct=="23C" & year==2010
replace sldu=12 if county=="Cascade" & precinct=="24A" & year==2010
replace sldu=12 if county=="Cascade" & precinct=="24B" & year==2010
replace sldu=12 if county=="Cascade" & precinct=="24C" & year==2010
replace sldu=13 if county=="Cascade" & precinct=="25A" & year==2010
replace sldu=13 if county=="Cascade" & precinct=="25B" & year==2010
replace sldu=13 if county=="Cascade" & precinct=="25C" & year==2010
replace sldu=13 if county=="Cascade" & precinct=="25D" & year==2010
replace sldu=13 if county=="Cascade" & precinct=="26A" & year==2010
replace sldu=13 if county=="Cascade" & precinct=="26B" & year==2010
replace sldu=13 if county=="Cascade" & precinct=="26C" & year==2010
replace sldu=13 if county=="Cascade" & precinct=="26D" & year==2010
replace sldu=13 if county=="Cascade" & precinct=="26E" & year==2010
replace sldu=14 if county=="Chouteau" & precinct=="1" & year==2010
replace sldu=15 if county=="Chouteau" & precinct=="10" & year==2010
replace sldu=15 if county=="Chouteau" & precinct=="11" & year==2010
replace sldu=16 if county=="Chouteau" & precinct=="12" & year==2010
replace sldu=14 if county=="Chouteau" & precinct=="2" & year==2010
replace sldu=14 if county=="Chouteau" & precinct=="3" & year==2010
replace sldu=14 if county=="Chouteau" & precinct=="4" & year==2010
replace sldu=14 if county=="Chouteau" & precinct=="5" & year==2010
replace sldu=15 if county=="Chouteau" & precinct=="6" & year==2010
replace sldu=14 if county=="Chouteau" & precinct=="7" & year==2010
replace sldu=14 if county=="Chouteau" & precinct=="8" & year==2010
replace sldu=15 if county=="Chouteau" & precinct=="9" & year==2010
replace sldu=20 if county=="Custer" & precinct=="1" & year==2010
replace sldu=20 if county=="Custer" & precinct=="10" & year==2010
replace sldu=20 if county=="Custer" & precinct=="11" & year==2010
replace sldu=20 if county=="Custer" & precinct=="12" & year==2010
replace sldu=20 if county=="Custer" & precinct=="13" & year==2010
replace sldu=20 if county=="Custer" & precinct=="14" & year==2010
replace sldu=20 if county=="Custer" & precinct=="2" & year==2010
replace sldu=20 if county=="Custer" & precinct=="3" & year==2010
replace sldu=20 if county=="Custer" & precinct=="4" & year==2010
replace sldu=23 if county=="Custer" & precinct=="5" & year==2010
replace sldu=20 if county=="Custer" & precinct=="6" & year==2010
replace sldu=23 if county=="Custer" & precinct=="7" & year==2010
replace sldu=20 if county=="Custer" & precinct=="8" & year==2010
replace sldu=20 if county=="Custer" & precinct=="9" & year==2010
replace sldu=18 if county=="Daniels" & precinct=="2" & year==2010
replace sldu=18 if county=="Daniels" & precinct=="3" & year==2010
replace sldu=18 if county=="Daniels" & precinct=="4" & year==2010
replace sldu=18 if county=="Daniels" & precinct=="5" & year==2010
replace sldu=18 if county=="Daniels" & precinct=="6" & year==2010
replace sldu=19 if county=="Dawson" & precinct=="1" & year==2010
replace sldu=19 if county=="Dawson" & precinct=="10" & year==2010
replace sldu=19 if county=="Dawson" & precinct=="2" & year==2010
replace sldu=19 if county=="Dawson" & precinct=="3" & year==2010
replace sldu=19 if county=="Dawson" & precinct=="4" & year==2010
replace sldu=19 if county=="Dawson" & precinct=="5" & year==2010
replace sldu=19 if county=="Dawson" & precinct=="6A" & year==2010
replace sldu=19 if county=="Dawson" & precinct=="6B" & year==2010
replace sldu=20 if county=="Dawson" & precinct=="6C" & year==2010
replace sldu=19 if county=="Dawson" & precinct=="7" & year==2010
replace sldu=19 if county=="Dawson" & precinct=="8" & year==2010
replace sldu=20 if county=="Dawson" & precinct=="9" & year==2010
replace sldu=43 if county=="Deer Lodge" & precinct=="1A" & year==2010
replace sldu=43 if county=="Deer Lodge" & precinct=="1" & year==2010
replace sldu=43 if county=="Deer Lodge" & precinct=="10" & year==2010
replace sldu=43 if county=="Deer Lodge" & precinct=="1A" & year==2010
replace sldu=43 if county=="Deer Lodge" & precinct=="2" & year==2010
replace sldu=43 if county=="Deer Lodge" & precinct=="2A" & year==2010
replace sldu=43 if county=="Deer Lodge" & precinct=="3" & year==2010
replace sldu=43 if county=="Deer Lodge" & precinct=="3A" & year==2010
replace sldu=43 if county=="Deer Lodge" & precinct=="4" & year==2010
replace sldu=43 if county=="Deer Lodge" & precinct=="4A" & year==2010
replace sldu=43 if county=="Deer Lodge" & precinct=="5" & year==2010
replace sldu=43 if county=="Deer Lodge" & precinct=="5A" & year==2010
replace sldu=43 if county=="Deer Lodge" & precinct=="6" & year==2010
replace sldu=43 if county=="Deer Lodge" & precinct=="6A" & year==2010
replace sldu=43 if county=="Deer Lodge" & precinct=="7" & year==2010
replace sldu=43 if county=="Deer Lodge" & precinct=="7A" & year==2010
replace sldu=43 if county=="Deer Lodge" & precinct=="8" & year==2010
replace sldu=43 if county=="Deer Lodge" & precinct=="9" & year==2010
replace sldu=20 if county=="Fallon" & precinct=="1" & year==2010
replace sldu=20 if county=="Fallon" & precinct=="2" & year==2010
replace sldu=20 if county=="Fallon" & precinct=="3" & year==2010
replace sldu=20 if county=="Fallon" & precinct=="4" & year==2010
replace sldu=20 if county=="Fallon" & precinct=="7" & year==2010
replace sldu=20 if county=="Fallon" & precinct=="8" & year==2010
replace sldu=15 if county=="Fergus" & precinct=="10" & year==2010
replace sldu=15 if county=="Fergus" & precinct=="11" & year==2010
replace sldu=15 if county=="Fergus" & precinct=="13" & year==2010
replace sldu=15 if county=="Fergus" & precinct=="14" & year==2010
replace sldu=15 if county=="Fergus" & precinct=="15" & year==2010
replace sldu=15 if county=="Fergus" & precinct=="16" & year==2010
replace sldu=15 if county=="Fergus" & precinct=="17" & year==2010
replace sldu=15 if county=="Fergus" & precinct=="18" & year==2010
replace sldu=15 if county=="Fergus" & precinct=="2" & year==2010
replace sldu=15 if county=="Fergus" & precinct=="3" & year==2010
replace sldu=15 if county=="Fergus" & precinct=="4" & year==2010
replace sldu=15 if county=="Fergus" & precinct=="5" & year==2010
replace sldu=15 if county=="Fergus" & precinct=="6" & year==2010
replace sldu=15 if county=="Fergus" & precinct=="7" & year==2010
replace sldu=15 if county=="Fergus" & precinct=="8" & year==2010
replace sldu=15 if county=="Fergus" & precinct=="9" & year==2010
replace sldu=4 if county=="Flathead" & precinct=="1" & year==2010
replace sldu=3 if county=="Flathead" & precinct=="11" & year==2010
replace sldu=5 if county=="Flathead" & precinct=="13" & year==2010
replace sldu=2 if county=="Flathead" & precinct=="14" & year==2010
replace sldu=2 if county=="Flathead" & precinct=="16" & year==2010
replace sldu=2 if county=="Flathead" & precinct=="17" & year==2010
replace sldu=2 if county=="Flathead" & precinct=="17*" & year==2010
replace sldu=3 if county=="Flathead" & precinct=="19" & year==2010
replace sldu=4 if county=="Flathead" & precinct=="2" & year==2010
replace sldu=2 if county=="Flathead" & precinct=="20" & year==2010
replace sldu=2 if county=="Flathead" & precinct=="21" & year==2010
replace sldu=2 if county=="Flathead" & precinct=="21*" & year==2010
replace sldu=6 if county=="Flathead" & precinct=="24" & year==2010
replace sldu=4 if county=="Flathead" & precinct=="25" & year==2010
replace sldu=3 if county=="Flathead" & precinct=="26" & year==2010
replace sldu=3 if county=="Flathead" & precinct=="26*" & year==2010
replace sldu=5 if county=="Flathead" & precinct=="29" & year==2010
replace sldu=4 if county=="Flathead" & precinct=="3" & year==2010
replace sldu=3 if county=="Flathead" & precinct=="30*" & year==2010
replace sldu=4 if county=="Flathead" & precinct=="32" & year==2010
replace sldu=2 if county=="Flathead" & precinct=="33" & year==2010
replace sldu=5 if county=="Flathead" & precinct=="34" & year==2010
replace sldu=5 if county=="Flathead" & precinct=="34*" & year==2010
replace sldu=2 if county=="Flathead" & precinct=="35" & year==2010
replace sldu=3 if county=="Flathead" & precinct=="36" & year==2010
replace sldu=5 if county=="Flathead" & precinct=="38" & year==2010
replace sldu=3 if county=="Flathead" & precinct=="39" & year==2010
replace sldu=4 if county=="Flathead" & precinct=="4" & year==2010
replace sldu=4 if county=="Flathead" & precinct=="41" & year==2010
replace sldu=5 if county=="Flathead" & precinct=="42" & year==2010
replace sldu=5 if county=="Flathead" & precinct=="43" & year==2010
replace sldu=2 if county=="Flathead" & precinct=="44" & year==2010
replace sldu=3 if county=="Flathead" & precinct=="45" & year==2010
replace sldu=2 if county=="Flathead" & precinct=="46" & year==2010
replace sldu=2 if county=="Flathead" & precinct=="47" & year==2010
replace sldu=2 if county=="Flathead" & precinct=="48" & year==2010
replace sldu=3 if county=="Flathead" & precinct=="49" & year==2010
replace sldu=4 if county=="Flathead" & precinct=="50" & year==2010
replace sldu=3 if county=="Flathead" & precinct=="6" & year==2010
replace sldu=3 if county=="Flathead" & precinct=="7" & year==2010
replace sldu=3 if county=="Flathead" & precinct=="8" & year==2010
replace sldu=3 if county=="Flathead" & precinct=="89" & year==2010
replace sldu=35 if county=="Gallatin" & precinct=="1" & year==2010
replace sldu=35 if county=="Gallatin" & precinct=="10" & year==2010
replace sldu=35 if county=="Gallatin" & precinct=="11" & year==2010
replace sldu=35 if county=="Gallatin" & precinct=="12" & year==2010
replace sldu=35 if county=="Gallatin" & precinct=="13" & year==2010
replace sldu=34 if county=="Gallatin" & precinct=="14" & year==2010
replace sldu=34 if county=="Gallatin" & precinct=="15" & year==2010
replace sldu=34 if county=="Gallatin" & precinct=="16" & year==2010
replace sldu=34 if county=="Gallatin" & precinct=="17" & year==2010
replace sldu=34 if county=="Gallatin" & precinct=="18" & year==2010
replace sldu=34 if county=="Gallatin" & precinct=="19" & year==2010
replace sldu=35 if county=="Gallatin" & precinct=="2" & year==2010
replace sldu=32 if county=="Gallatin" & precinct=="20" & year==2010
replace sldu=32 if county=="Gallatin" & precinct=="21" & year==2010
replace sldu=32 if county=="Gallatin" & precinct=="22" & year==2010
replace sldu=32 if county=="Gallatin" & precinct=="23" & year==2010
replace sldu=32 if county=="Gallatin" & precinct=="24" & year==2010
replace sldu=32 if county=="Gallatin" & precinct=="25" & year==2010
replace sldu=34 if county=="Gallatin" & precinct=="26" & year==2010
replace sldu=34 if county=="Gallatin" & precinct=="27" & year==2010
replace sldu=34 if county=="Gallatin" & precinct=="28" & year==2010
replace sldu=34 if county=="Gallatin" & precinct=="29" & year==2010
replace sldu=35 if county=="Gallatin" & precinct=="3" & year==2010
replace sldu=34 if county=="Gallatin" & precinct=="30" & year==2010
replace sldu=34 if county=="Gallatin" & precinct=="31" & year==2010
replace sldu=33 if county=="Gallatin" & precinct=="32" & year==2010
replace sldu=33 if county=="Gallatin" & precinct=="33" & year==2010
replace sldu=33 if county=="Gallatin" & precinct=="34" & year==2010
replace sldu=33 if county=="Gallatin" & precinct=="35" & year==2010
replace sldu=33 if county=="Gallatin" & precinct=="36" & year==2010
replace sldu=33 if county=="Gallatin" & precinct=="37" & year==2010
replace sldu=33 if county=="Gallatin" & precinct=="38" & year==2010
replace sldu=33 if county=="Gallatin" & precinct=="39" & year==2010
replace sldu=35 if county=="Gallatin" & precinct=="4" & year==2010
replace sldu=33 if county=="Gallatin" & precinct=="40" & year==2010
replace sldu=32 if county=="Gallatin" & precinct=="41" & year==2010
replace sldu=32 if county=="Gallatin" & precinct=="42" & year==2010
replace sldu=32 if county=="Gallatin" & precinct=="43" & year==2010
replace sldu=32 if county=="Gallatin" & precinct=="44" & year==2010
replace sldu=32 if county=="Gallatin" & precinct=="45" & year==2010
replace sldu=32 if county=="Gallatin" & precinct=="46" & year==2010
replace sldu=35 if county=="Gallatin" & precinct=="5" & year==2010
replace sldu=35 if county=="Gallatin" & precinct=="6" & year==2010
replace sldu=35 if county=="Gallatin" & precinct=="7" & year==2010
replace sldu=35 if county=="Gallatin" & precinct=="8" & year==2010
replace sldu=35 if county=="Gallatin" & precinct=="9" & year==2010
replace sldu=15 if county=="Garfield" & precinct=="1" & year==2010
replace sldu=15 if county=="Garfield" & precinct=="13" & year==2010
replace sldu=15 if county=="Garfield" & precinct=="14" & year==2010
replace sldu=15 if county=="Garfield" & precinct=="19" & year==2010
replace sldu=15 if county=="Garfield" & precinct=="5" & year==2010
replace sldu=15 if county=="Garfield" & precinct=="7" & year==2010
replace sldu=15 if county=="Garfield" & precinct=="8" & year==2010
replace sldu=14 if county=="Glacier" & precinct=="1" & year==2010
replace sldu=8 if county=="Glacier" & precinct=="10" & year==2010
replace sldu=8 if county=="Glacier" & precinct=="11" & year==2010
replace sldu=8 if county=="Glacier" & precinct=="12" & year==2010
replace sldu=8 if county=="Glacier" & precinct=="13" & year==2010
replace sldu=8 if county=="Glacier" & precinct=="14" & year==2010
replace sldu=8 if county=="Glacier" & precinct=="15" & year==2010
replace sldu=8 if county=="Glacier" & precinct=="19" & year==2010
replace sldu=14 if county=="Glacier" & precinct=="2" & year==2010
replace sldu=8 if county=="Glacier" & precinct=="21C" & year==2010
replace sldu=14 if county=="Glacier" & precinct=="3" & year==2010
replace sldu=14 if county=="Glacier" & precinct=="4" & year==2010
replace sldu=8 if county=="Glacier" & precinct=="5" & year==2010
replace sldu=14 if county=="Glacier" & precinct=="6" & year==2010
replace sldu=8 if county=="Glacier" & precinct=="8" & year==2010
replace sldu=8 if county=="Glacier" & precinct=="9" & year==2010
replace sldu=42 if county=="Golden Valley" & precinct=="1" & year==2010
replace sldu=42 if county=="Golden Valley" & precinct=="2" & year==2010
replace sldu=43 if county=="Granite" & precinct=="1" & year==2010
replace sldu=43 if county=="Granite" & precinct=="10" & year==2010
replace sldu=43 if county=="Granite" & precinct=="2" & year==2010
replace sldu=43 if county=="Granite" & precinct=="9" & year==2010
replace sldu=17 if county=="Hill" & precinct=="1" & year==2010
replace sldu=17 if county=="Hill" & precinct=="10" & year==2010
replace sldu=17 if county=="Hill" & precinct=="13" & year==2010
replace sldu=16 if county=="Hill" & precinct=="14" & year==2010
replace sldu=17 if county=="Hill" & precinct=="15" & year==2010
replace sldu=17 if county=="Hill" & precinct=="16" & year==2010
replace sldu=16 if county=="Hill" & precinct=="18" & year==2010
replace sldu=17 if county=="Hill" & precinct=="2" & year==2010
replace sldu=17 if county=="Hill" & precinct=="20" & year==2010
replace sldu=17 if county=="Hill" & precinct=="21" & year==2010
replace sldu=17 if county=="Hill" & precinct=="22" & year==2010
replace sldu=17 if county=="Hill" & precinct=="25" & year==2010
replace sldu=16 if county=="Hill" & precinct=="28" & year==2010
replace sldu=17 if county=="Hill" & precinct=="3" & year==2010
replace sldu=17 if county=="Hill" & precinct=="4" & year==2010
replace sldu=17 if county=="Hill" & precinct=="7" & year==2010
replace sldu=17 if county=="Hill" & precinct=="8" & year==2010
replace sldu=17 if county=="Hill" & precinct=="9" & year==2010
replace sldu=39 if county=="Jefferson" & precinct=="1" & year==2010
replace sldu=39 if county=="Jefferson" & precinct=="12" & year==2010
replace sldu=39 if county=="Jefferson" & precinct=="15" & year==2010
replace sldu=39 if county=="Jefferson" & precinct=="2" & year==2010
replace sldu=39 if county=="Jefferson" & precinct=="20" & year==2010
replace sldu=39 if county=="Jefferson" & precinct=="26" & year==2010
replace sldu=39 if county=="Jefferson" & precinct=="27" & year==2010
replace sldu=39 if county=="Jefferson" & precinct=="3" & year==2010
replace sldu=36 if county=="Jefferson" & precinct=="4" & year==2010
replace sldu=39 if county=="Jefferson" & precinct=="5" & year==2010
replace sldu=36 if county=="Jefferson" & precinct=="6" & year==2010
replace sldu=39 if county=="Jefferson" & precinct=="7" & year==2010
replace sldu=39 if county=="Jefferson" & precinct=="8" & year==2010
replace sldu=36 if county=="Jefferson" & precinct=="9" & year==2010
replace sldu=15 if county=="Judith Basin" & precinct=="1" & year==2010
replace sldu=15 if county=="Judith Basin" & precinct=="2" & year==2010
replace sldu=15 if county=="Judith Basin" & precinct=="3" & year==2010
replace sldu=15 if county=="Judith Basin" & precinct=="4" & year==2010
replace sldu=6 if county=="Lake" & precinct=="1" & year==2010
replace sldu=6 if county=="Lake" & precinct=="10" & year==2010
replace sldu=6 if county=="Lake" & precinct=="11" & year==2010
replace sldu=6 if county=="Lake" & precinct=="12" & year==2010
replace sldu=5 if county=="Lake" & precinct=="13" & year==2010
replace sldu=5 if county=="Lake" & precinct=="14" & year==2010
replace sldu=5 if county=="Lake" & precinct=="15" & year==2010
replace sldu=5 if county=="Lake" & precinct=="16" & year==2010
replace sldu=8 if county=="Lake" & precinct=="17" & year==2010
replace sldu=8 if county=="Lake" & precinct=="18" & year==2010
replace sldu=8 if county=="Lake" & precinct=="19" & year==2010
replace sldu=6 if county=="Lake" & precinct=="2" & year==2010
replace sldu=8 if county=="Lake" & precinct=="20" & year==2010
replace sldu=8 if county=="Lake" & precinct=="21" & year==2010
replace sldu=8 if county=="Lake" & precinct=="22" & year==2010
replace sldu=6 if county=="Lake" & precinct=="3" & year==2010
replace sldu=6 if county=="Lake" & precinct=="4" & year==2010
replace sldu=6 if county=="Lake" & precinct=="5" & year==2010
replace sldu=6 if county=="Lake" & precinct=="6" & year==2010
replace sldu=6 if county=="Lake" & precinct=="7" & year==2010
replace sldu=6 if county=="Lake" & precinct=="8" & year==2010
replace sldu=6 if county=="Lake" & precinct=="9" & year==2010
replace sldu=41 if county=="Lewis & Clark" & precinct=="1" & year==2010
replace sldu=41 if county=="Lewis & Clark" & precinct=="10" & year==2010
replace sldu=41 if county=="Lewis & Clark" & precinct=="11" & year==2010
replace sldu=41 if county=="Lewis & Clark" & precinct=="12" & year==2010
replace sldu=40 if county=="Lewis & Clark" & precinct=="13" & year==2010
replace sldu=40 if county=="Lewis & Clark" & precinct=="14" & year==2010
replace sldu=40 if county=="Lewis & Clark" & precinct=="15" & year==2010
replace sldu=40 if county=="Lewis & Clark" & precinct=="16" & year==2010
replace sldu=40 if county=="Lewis & Clark" & precinct=="17" & year==2010
replace sldu=40 if county=="Lewis & Clark" & precinct=="18" & year==2010
replace sldu=40 if county=="Lewis & Clark" & precinct=="19" & year==2010
replace sldu=41 if county=="Lewis & Clark" & precinct=="2" & year==2010
replace sldu=40 if county=="Lewis & Clark" & precinct=="20" & year==2010
replace sldu=40 if county=="Lewis & Clark" & precinct=="21" & year==2010
replace sldu=40 if county=="Lewis & Clark" & precinct=="22" & year==2010
replace sldu=39 if county=="Lewis & Clark" & precinct=="23" & year==2010
replace sldu=39 if county=="Lewis & Clark" & precinct=="24" & year==2010
replace sldu=39 if county=="Lewis & Clark" & precinct=="25" & year==2010
replace sldu=41 if county=="Lewis & Clark" & precinct=="26" & year==2010
replace sldu=41 if county=="Lewis & Clark" & precinct=="27" & year==2010
replace sldu=41 if county=="Lewis & Clark" & precinct=="28" & year==2010
replace sldu=41 if county=="Lewis & Clark" & precinct=="29" & year==2010
replace sldu=41 if county=="Lewis & Clark" & precinct=="3" & year==2010
replace sldu=40 if county=="Lewis & Clark" & precinct=="30" & year==2010
replace sldu=40 if county=="Lewis & Clark" & precinct=="31" & year==2010
replace sldu=40 if county=="Lewis & Clark" & precinct=="32" & year==2010
replace sldu=40 if county=="Lewis & Clark" & precinct=="33" & year==2010
replace sldu=40 if county=="Lewis & Clark" & precinct=="34" & year==2010
replace sldu=42 if county=="Lewis & Clark" & precinct=="35" & year==2010
replace sldu=42 if county=="Lewis & Clark" & precinct=="36" & year==2010
replace sldu=42 if county=="Lewis & Clark" & precinct=="37" & year==2010
replace sldu=42 if county=="Lewis & Clark" & precinct=="38" & year==2010
replace sldu=42 if county=="Lewis & Clark" & precinct=="39" & year==2010
replace sldu=41 if county=="Lewis & Clark" & precinct=="4" & year==2010
replace sldu=42 if county=="Lewis & Clark" & precinct=="40" & year==2010
replace sldu=42 if county=="Lewis & Clark" & precinct=="41" & year==2010
replace sldu=42 if county=="Lewis & Clark" & precinct=="42" & year==2010
replace sldu=42 if county=="Lewis & Clark" & precinct=="43" & year==2010
replace sldu=9 if county=="Lewis & Clark" & precinct=="44" & year==2010
replace sldu=9 if county=="Lewis & Clark" & precinct=="45" & year==2010
replace sldu=9 if county=="Lewis & Clark" & precinct=="46" & year==2010
replace sldu=42 if county=="Lewis & Clark" & precinct=="47" & year==2010
replace sldu=42 if county=="Lewis & Clark" & precinct=="48" & year==2010
replace sldu=42 if county=="Lewis & Clark" & precinct=="49" & year==2010
replace sldu=39 if county=="Lewis & Clark" & precinct=="5" & year==2010
replace sldu=39 if county=="Lewis & Clark" & precinct=="50" & year==2010
replace sldu=39 if county=="Lewis & Clark" & precinct=="51" & year==2010
replace sldu=39 if county=="Lewis & Clark" & precinct=="52" & year==2010
replace sldu=39 if county=="Lewis & Clark" & precinct=="53" & year==2010
replace sldu=39 if county=="Lewis & Clark" & precinct=="54" & year==2010
replace sldu=41 if county=="Lewis & Clark" & precinct=="6" & year==2010
replace sldu=41 if county=="Lewis & Clark" & precinct=="7" & year==2010
replace sldu=41 if county=="Lewis & Clark" & precinct=="8" & year==2010
replace sldu=41 if county=="Lewis & Clark" & precinct=="9" & year==2010
replace sldu=14 if county=="Liberty" & precinct=="1" & year==2010
replace sldu=14 if county=="Liberty" & precinct=="2" & year==2010
replace sldu=14 if county=="Liberty" & precinct=="3" & year==2010
replace sldu=14 if county=="Liberty" & precinct=="4" & year==2010

replace sldu=1 if county=="Lincoln" & year==2010


replace sldu=36 if county=="Madison" & precinct=="1 -- 1" & year==2010
replace sldu=36 if county=="Madison" & precinct=="1 -- 2" & year==2010
replace sldu=36 if county=="Madison" & precinct=="15-1" & year==2010
replace sldu=36 if county=="Madison" & precinct=="15-2" & year==2010
replace sldu=36 if county=="Madison" & precinct=="20" & year==2010
replace sldu=36 if county=="Madison" & precinct=="21" & year==2010
replace sldu=36 if county=="Madison" & precinct=="5" & year==2010
replace sldu=36 if county=="Madison" & precinct=="7" & year==2010
replace sldu=15 if county=="McCone" & precinct=="27" & year==2010
replace sldu=20 if county=="McCone" & precinct=="4" & year==2010
replace sldu=15 if county=="McCone" & precinct=="8" & year==2010
replace sldu=42 if county=="Meagher" & precinct=="5" & year==2010
replace sldu=7 if county=="Mineral" & precinct=="22" & year==2010
replace sldu=7 if county=="Mineral" & precinct=="24" & year==2010
replace sldu=7 if county=="Mineral" & precinct=="25" & year==2010
replace sldu=7 if county=="Mineral" & precinct=="26" & year==2010
replace sldu=7 if county=="Mineral" & precinct=="27" & year==2010
replace sldu=7 if county=="Mineral" & precinct=="30" & year==2010
replace sldu=8 if county=="Missoula" & precinct=="1" & year==2010
replace sldu=46 if county=="Missoula" & precinct=="10" & year==2010
replace sldu=46 if county=="Missoula" & precinct=="100" & year==2010
replace sldu=46 if county=="Missoula" & precinct=="101" & year==2010
replace sldu=47 if county=="Missoula" & precinct=="11" & year==2010
replace sldu=46 if county=="Missoula" & precinct=="12" & year==2010
replace sldu=50 if county=="Missoula" & precinct=="13" & year==2010
replace sldu=50 if county=="Missoula" & precinct=="14" & year==2010
replace sldu=50 if county=="Missoula" & precinct=="15" & year==2010
replace sldu=50 if county=="Missoula" & precinct=="16" & year==2010
replace sldu=50 if county=="Missoula" & precinct=="17" & year==2010
replace sldu=50 if county=="Missoula" & precinct=="18" & year==2010
replace sldu=50 if county=="Missoula" & precinct=="19" & year==2010
replace sldu=46 if county=="Missoula" & precinct=="2" & year==2010
replace sldu=7 if county=="Missoula" & precinct=="20" & year==2010
replace sldu=48 if county=="Missoula" & precinct=="21" & year==2010
replace sldu=49 if county=="Missoula" & precinct=="22" & year==2010
replace sldu=49 if county=="Missoula" & precinct=="23" & year==2010
replace sldu=49 if county=="Missoula" & precinct=="24" & year==2010
replace sldu=50 if county=="Missoula" & precinct=="25" & year==2010
replace sldu=49 if county=="Missoula" & precinct=="26" & year==2010
replace sldu=49 if county=="Missoula" & precinct=="27" & year==2010
replace sldu=50 if county=="Missoula" & precinct=="28" & year==2010
replace sldu=49 if county=="Missoula" & precinct=="29" & year==2010
replace sldu=46 if county=="Missoula" & precinct=="3" & year==2010
replace sldu=50 if county=="Missoula" & precinct=="30" & year==2010
replace sldu=50 if county=="Missoula" & precinct=="31" & year==2010
replace sldu=49 if county=="Missoula" & precinct=="32" & year==2010
replace sldu=50 if county=="Missoula" & precinct=="33" & year==2010
replace sldu=7 if county=="Missoula" & precinct=="34" & year==2010
replace sldu=50 if county=="Missoula" & precinct=="35" & year==2010
replace sldu=7 if county=="Missoula" & precinct=="36" & year==2010
replace sldu=7 if county=="Missoula" & precinct=="37" & year==2010
replace sldu=7 if county=="Missoula" & precinct=="38" & year==2010
replace sldu=7 if county=="Missoula" & precinct=="39" & year==2010
replace sldu=46 if county=="Missoula" & precinct=="4" & year==2010
replace sldu=50 if county=="Missoula" & precinct=="40" & year==2010
replace sldu=7 if county=="Missoula" & precinct=="41" & year==2010
replace sldu=50 if county=="Missoula" & precinct=="42" & year==2010
replace sldu=47 if county=="Missoula" & precinct=="43" & year==2010
replace sldu=48 if county=="Missoula" & precinct=="44" & year==2010
replace sldu=48 if county=="Missoula" & precinct=="45" & year==2010
replace sldu=48 if county=="Missoula" & precinct=="46" & year==2010
replace sldu=47 if county=="Missoula" & precinct=="47" & year==2010
replace sldu=47 if county=="Missoula" & precinct=="48" & year==2010
replace sldu=48 if county=="Missoula" & precinct=="49" & year==2010
replace sldu=46 if county=="Missoula" & precinct=="5" & year==2010
replace sldu=48 if county=="Missoula" & precinct=="50" & year==2010
replace sldu=48 if county=="Missoula" & precinct=="51" & year==2010
replace sldu=48 if county=="Missoula" & precinct=="52" & year==2010
replace sldu=47 if county=="Missoula" & precinct=="53" & year==2010
replace sldu=47 if county=="Missoula" & precinct=="54" & year==2010
replace sldu=47 if county=="Missoula" & precinct=="55" & year==2010
replace sldu=47 if county=="Missoula" & precinct=="56" & year==2010
replace sldu=48 if county=="Missoula" & precinct=="57" & year==2010
replace sldu=47 if county=="Missoula" & precinct=="58" & year==2010
replace sldu=48 if county=="Missoula" & precinct=="59" & year==2010
replace sldu=46 if county=="Missoula" & precinct=="6" & year==2010
replace sldu=48 if county=="Missoula" & precinct=="60" & year==2010
replace sldu=48 if county=="Missoula" & precinct=="61" & year==2010
replace sldu=48 if county=="Missoula" & precinct=="62" & year==2010
replace sldu=48 if county=="Missoula" & precinct=="63" & year==2010
replace sldu=49 if county=="Missoula" & precinct=="64" & year==2010
replace sldu=49 if county=="Missoula" & precinct=="65" & year==2010
replace sldu=49 if county=="Missoula" & precinct=="66" & year==2010
replace sldu=48 if county=="Missoula" & precinct=="67" & year==2010
replace sldu=49 if county=="Missoula" & precinct=="68" & year==2010
replace sldu=49 if county=="Missoula" & precinct=="69" & year==2010
replace sldu=46 if county=="Missoula" & precinct=="7" & year==2010
replace sldu=49 if county=="Missoula" & precinct=="70" & year==2010
replace sldu=46 if county=="Missoula" & precinct=="71" & year==2010
replace sldu=49 if county=="Missoula" & precinct=="72" & year==2010
replace sldu=49 if county=="Missoula" & precinct=="73" & year==2010
replace sldu=49 if county=="Missoula" & precinct=="74" & year==2010
replace sldu=49 if county=="Missoula" & precinct=="75" & year==2010
replace sldu=47 if county=="Missoula" & precinct=="76" & year==2010
replace sldu=47 if county=="Missoula" & precinct=="77" & year==2010
replace sldu=48 if county=="Missoula" & precinct=="78" & year==2010
replace sldu=48 if county=="Missoula" & precinct=="79" & year==2010
replace sldu=46 if county=="Missoula" & precinct=="8" & year==2010
replace sldu=48 if county=="Missoula" & precinct=="80" & year==2010
replace sldu=47 if county=="Missoula" & precinct=="81" & year==2010
replace sldu=47 if county=="Missoula" & precinct=="82" & year==2010
replace sldu=47 if county=="Missoula" & precinct=="83" & year==2010
replace sldu=47 if county=="Missoula" & precinct=="84" & year==2010
replace sldu=47 if county=="Missoula" & precinct=="85" & year==2010
replace sldu=49 if county=="Missoula" & precinct=="86" & year==2010
replace sldu=47 if county=="Missoula" & precinct=="87" & year==2010
replace sldu=50 if county=="Missoula" & precinct=="88" & year==2010
replace sldu=49 if county=="Missoula" & precinct=="89" & year==2010
replace sldu=46 if county=="Missoula" & precinct=="9" & year==2010
replace sldu=50 if county=="Missoula" & precinct=="90" & year==2010
replace sldu=46 if county=="Missoula" & precinct=="91" & year==2010
replace sldu=50 if county=="Missoula" & precinct=="92" & year==2010
replace sldu=50 if county=="Missoula" & precinct=="93" & year==2010
replace sldu=46 if county=="Missoula" & precinct=="94" & year==2010
replace sldu=46 if county=="Missoula" & precinct=="95" & year==2010
replace sldu=46 if county=="Missoula" & precinct=="96" & year==2010
replace sldu=46 if county=="Missoula" & precinct=="97" & year==2010
replace sldu=46 if county=="Missoula" & precinct=="98" & year==2010
replace sldu=46 if county=="Missoula" & precinct=="99" & year==2010
replace sldu=23 if county=="Musselshell" & precinct=="1" & year==2010
replace sldu=23 if county=="Musselshell" & precinct=="3" & year==2010
replace sldu=23 if county=="Musselshell" & precinct=="5" & year==2010
replace sldu=23 if county=="Musselshell" & precinct=="6" & year==2010
replace sldu=23 if county=="Musselshell" & precinct=="7" & year==2010
replace sldu=23 if county=="Musselshell" & precinct=="8" & year==2010
replace sldu=31 if county=="Park" & precinct=="1" & year==2010
replace sldu=31 if county=="Park" & precinct=="2" & year==2010
replace sldu=31 if county=="Park" & precinct=="2-B" & year==2010
replace sldu=31 if county=="Park" & precinct=="3" & year==2010
replace sldu=31 if county=="Park" & precinct=="4" & year==2010
replace sldu=31 if county=="Park" & precinct=="5-A" & year==2010
replace sldu=31 if county=="Park" & precinct=="5-B" & year==2010
replace sldu=31 if county=="Park" & precinct=="5-C" & year==2010
replace sldu=31 if county=="Park" & precinct=="5-D" & year==2010
replace sldu=31 if county=="Park" & precinct=="6-A" & year==2010
replace sldu=31 if county=="Park" & precinct=="6-B" & year==2010
replace sldu=31 if county=="Park" & precinct=="7-A" & year==2010
replace sldu=31 if county=="Park" & precinct=="7-B" & year==2010
replace sldu=31 if county=="Park" & precinct=="7-C" & year==2010
replace sldu=31 if county=="Park" & precinct=="7-D" & year==2010
replace sldu=15 if county=="Petroleum" & precinct=="1" & year==2010
replace sldu=16 if county=="Phillips" & precinct=="11" & year==2010
replace sldu=18 if county=="Phillips" & precinct=="12-N" & year==2010
replace sldu=16 if county=="Phillips" & precinct=="12-S" & year==2010
replace sldu=18 if county=="Phillips" & precinct=="16" & year==2010
replace sldu=18 if county=="Phillips" & precinct=="2-N" & year==2010
replace sldu=16 if county=="Phillips" & precinct=="2-S" & year==2010
replace sldu=16 if county=="Phillips" & precinct=="5" & year==2010
replace sldu=16 if county=="Phillips" & precinct=="6" & year==2010
replace sldu=18 if county=="Phillips" & precinct=="7" & year==2010
replace sldu=18 if county=="Phillips" & precinct=="8-N" & year==2010
replace sldu=16 if county=="Phillips" & precinct=="8-S" & year==2010
replace sldu=18 if county=="Phillips" & precinct=="43344" & year==2010
replace sldu=18 if county=="Phillips" & precinct=="43345" & year==2010
replace sldu=14 if county=="Pondera" & precinct=="19" & year==2010
replace sldu=8 if county=="Pondera" & precinct=="20" & year==2010
replace sldu=14 if county=="Pondera" & precinct=="23" & year==2010
replace sldu=14 if county=="Pondera" & precinct=="24" & year==2010
replace sldu=14 if county=="Pondera" & precinct=="27" & year==2010
replace sldu=14 if county=="Pondera" & precinct=="28" & year==2010
replace sldu=14 if county=="Pondera" & precinct=="34" & year==2010
replace sldu=14 if county=="Pondera" & precinct=="35" & year==2010
replace sldu=20 if county=="Powder River" & precinct=="1" & year==2010
replace sldu=20 if county=="Powder River" & precinct=="11" & year==2010
replace sldu=20 if county=="Powder River" & precinct=="12" & year==2010
replace sldu=20 if county=="Powder River" & precinct=="3" & year==2010
replace sldu=21 if county=="Powder River" & precinct=="4" & year==2010
replace sldu=21 if county=="Powder River" & precinct=="5" & year==2010
replace sldu=20 if county=="Powder River" & precinct=="7" & year==2010
replace sldu=20 if county=="Powder River" & precinct=="9" & year==2010
replace sldu=42 if county=="Powell" & precinct=="1" & year==2010
replace sldu=42 if county=="Powell" & precinct=="10" & year==2010
replace sldu=42 if county=="Powell" & precinct=="11" & year==2010
replace sldu=9 if county=="Powell" & precinct=="12.1" & year==2010
replace sldu=42 if county=="Powell" & precinct=="12.2" & year==2010
replace sldu=9 if county=="Powell" & precinct=="14.1" & year==2010
replace sldu=42 if county=="Powell" & precinct=="14.2" & year==2010
replace sldu=42 if county=="Powell" & precinct=="16.1" & year==2010
replace sldu=43 if county=="Powell" & precinct=="16.2" & year==2010
replace sldu=42 if county=="Powell" & precinct=="3.1" & year==2010
replace sldu=43 if county=="Powell" & precinct=="3.2" & year==2010
replace sldu=43 if county=="Powell" & precinct=="4" & year==2010
replace sldu=43 if county=="Powell" & precinct=="5" & year==2010
replace sldu=43 if county=="Powell" & precinct=="6" & year==2010
replace sldu=43 if county=="Powell" & precinct=="7" & year==2010
replace sldu=42 if county=="Powell" & precinct=="8" & year==2010
replace sldu=20 if county=="Prairie" & precinct=="1" & year==2010
replace sldu=20 if county=="Prairie" & precinct=="2" & year==2010
replace sldu=20 if county=="Prairie" & precinct=="3" & year==2010
replace sldu=20 if county=="Prairie" & precinct=="4" & year==2010
replace sldu=44 if county=="Ravalli" & precinct=="1" & year==2010
replace sldu=44 if county=="Ravalli" & precinct=="10" & year==2010
replace sldu=44 if county=="Ravalli" & precinct=="11" & year==2010
replace sldu=45 if county=="Ravalli" & precinct=="12" & year==2010
replace sldu=44 if county=="Ravalli" & precinct=="13" & year==2010
replace sldu=44 if county=="Ravalli" & precinct=="14" & year==2010
replace sldu=45 if county=="Ravalli" & precinct=="15" & year==2010
replace sldu=45 if county=="Ravalli" & precinct=="16" & year==2010
replace sldu=45 if county=="Ravalli" & precinct=="17" & year==2010
replace sldu=45 if county=="Ravalli" & precinct=="18" & year==2010
replace sldu=45 if county=="Ravalli" & precinct=="19" & year==2010
replace sldu=44 if county=="Ravalli" & precinct=="2" & year==2010
replace sldu=45 if county=="Ravalli" & precinct=="20" & year==2010
replace sldu=45 if county=="Ravalli" & precinct=="21" & year==2010
replace sldu=45 if county=="Ravalli" & precinct=="22" & year==2010
replace sldu=44 if county=="Ravalli" & precinct=="3" & year==2010
replace sldu=44 if county=="Ravalli" & precinct=="4" & year==2010
replace sldu=44 if county=="Ravalli" & precinct=="5" & year==2010
replace sldu=44 if county=="Ravalli" & precinct=="6" & year==2010
replace sldu=44 if county=="Ravalli" & precinct=="7" & year==2010
replace sldu=44 if county=="Ravalli" & precinct=="8" & year==2010
replace sldu=44 if county=="Ravalli" & precinct=="9" & year==2010
replace sldu=19 if county=="Richland" & precinct=="1" & year==2010
replace sldu=18 if county=="Richland" & precinct=="12a" & year==2010
replace sldu=19 if county=="Richland" & precinct=="12b" & year==2010
replace sldu=18 if county=="Richland" & precinct=="17" & year==2010
replace sldu=18 if county=="Richland" & precinct=="19" & year==2010
replace sldu=19 if county=="Richland" & precinct=="2" & year==2010
replace sldu=19 if county=="Richland" & precinct=="22" & year==2010
replace sldu=19 if county=="Richland" & precinct=="23" & year==2010
replace sldu=19 if county=="Richland" & precinct=="3" & year==2010
replace sldu=19 if county=="Richland" & precinct=="4" & year==2010
replace sldu=19 if county=="Richland" & precinct=="5" & year==2010
replace sldu=18 if county=="Richland" & precinct=="7a" & year==2010
replace sldu=19 if county=="Richland" & precinct=="7b" & year==2010
replace sldu=19 if county=="Richland" & precinct=="8" & year==2010
replace sldu=19 if county=="Richland" & precinct=="9" & year==2010
replace sldu=18 if county=="Roosevelt" & precinct=="10" & year==2010
replace sldu=18 if county=="Roosevelt" & precinct=="12" & year==2010
replace sldu=16 if county=="Roosevelt" & precinct=="15" & year==2010
replace sldu=16 if county=="Roosevelt" & precinct=="16" & year==2010
replace sldu=18 if county=="Roosevelt" & precinct=="17" & year==2010
replace sldu=16 if county=="Roosevelt" & precinct=="18" & year==2010
replace sldu=18 if county=="Roosevelt" & precinct=="2" & year==2010
replace sldu=18 if county=="Roosevelt" & precinct=="20" & year==2010
replace sldu=16 if county=="Roosevelt" & precinct=="22" & year==2010
replace sldu=16 if county=="Roosevelt" & precinct=="24" & year==2010
replace sldu=16 if county=="Roosevelt" & precinct=="26" & year==2010
replace sldu=16 if county=="Roosevelt" & precinct=="27" & year==2010
replace sldu=18 if county=="Roosevelt" & precinct=="28" & year==2010
replace sldu=23 if county=="Rosebud" & precinct=="10" & year==2010
replace sldu=22 if county=="Rosebud" & precinct=="11" & year==2010
replace sldu=21 if county=="Rosebud" & precinct=="15" & year==2010
replace sldu=21 if county=="Rosebud" & precinct=="17" & year==2010
replace sldu=23 if county=="Rosebud" & precinct=="20" & year==2010
replace sldu=22 if county=="Rosebud" & precinct=="21" & year==2010
replace sldu=23 if county=="Rosebud" & precinct=="26" & year==2010
replace sldu=22 if county=="Rosebud" & precinct=="3" & year==2010
replace sldu=21 if county=="Rosebud" & precinct=="30" & year==2010
replace sldu=22 if county=="Rosebud" & precinct=="32" & year==2010
replace sldu=22 if county=="Rosebud" & precinct=="6" & year==2010
replace sldu=21 if county=="Rosebud" & precinct=="7" & year==2010
replace sldu=7 if county=="Sanders" & precinct=="1" & year==2010
replace sldu=7 if county=="Sanders" & precinct=="10" & year==2010
replace sldu=7 if county=="Sanders" & precinct=="2" & year==2010
replace sldu=7 if county=="Sanders" & precinct=="3" & year==2010
replace sldu=7 if county=="Sanders" & precinct=="4" & year==2010
replace sldu=7 if county=="Sanders" & precinct=="5" & year==2010
replace sldu=7 if county=="Sanders" & precinct=="6" & year==2010
replace sldu=7 if county=="Sanders" & precinct=="7" & year==2010
replace sldu=7 if county=="Sanders" & precinct=="8" & year==2010
replace sldu=7 if county=="Sanders" & precinct=="8" & year==2010
replace sldu=7 if county=="Sanders" & precinct=="9" & year==2010
replace sldu=18 if county=="Sheridan" & precinct=="1" & year==2010
replace sldu=18 if county=="Sheridan" & precinct=="2" & year==2010
replace sldu=18 if county=="Sheridan" & precinct=="3" & year==2010
replace sldu=18 if county=="Sheridan" & precinct=="4" & year==2010
replace sldu=18 if county=="Sheridan" & precinct=="5" & year==2010
replace sldu=18 if county=="Sheridan" & precinct=="6" & year==2010
replace sldu=38 if county=="Silver Bow" & precinct=="10E,N&S" & year==2010
replace sldu=38 if county=="Silver Bow" & precinct=="11C" & year==2010
replace sldu=38 if county=="Silver Bow" & precinct=="12C" & year==2010
replace sldu=38 if county=="Silver Bow" & precinct=="13N&S" & year==2010
replace sldu=38 if county=="Silver Bow" & precinct=="14C" & year==2010
replace sldu=38 if county=="Silver Bow" & precinct=="15N&S" & year==2010
replace sldu=37 if county=="Silver Bow" & precinct=="16E&W" & year==2010
replace sldu=38 if county=="Silver Bow" & precinct=="17C" & year==2010
replace sldu=38 if county=="Silver Bow" & precinct=="18C" & year==2010
replace sldu=37 if county=="Silver Bow" & precinct=="19N&S" & year==2010
replace sldu=38 if county=="Silver Bow" & precinct=="1C" & year==2010
replace sldu=37 if county=="Silver Bow" & precinct=="20N&S" & year==2010
replace sldu=38 if county=="Silver Bow" & precinct=="21N" & year==2010
replace sldu=37 if county=="Silver Bow" & precinct=="22C" & year==2010
replace sldu=37 if county=="Silver Bow" & precinct=="23N&S" & year==2010
replace sldu=37 if county=="Silver Bow" & precinct=="24N&S" & year==2010
replace sldu=38 if county=="Silver Bow" & precinct=="25C" & year==2010
replace sldu=37 if county=="Silver Bow" & precinct=="26E&W" & year==2010
replace sldu=38 if county=="Silver Bow" & precinct=="27N" & year==2010
replace sldu=37 if county=="Silver Bow" & precinct=="27S" & year==2010
replace sldu=37 if county=="Silver Bow" & precinct=="28C" & year==2010
replace sldu=37 if county=="Silver Bow" & precinct=="29C" & year==2010
replace sldu=38 if county=="Silver Bow" & precinct=="2C" & year==2010
replace sldu=38 if county=="Silver Bow" & precinct=="3C" & year==2010
replace sldu=38 if county=="Silver Bow" & precinct=="4C" & year==2010
replace sldu=37 if county=="Silver Bow" & precinct=="5C" & year==2010
replace sldu=37 if county=="Silver Bow" & precinct=="6C" & year==2010
replace sldu=37 if county=="Silver Bow" & precinct=="7N&S" & year==2010
replace sldu=37 if county=="Silver Bow" & precinct=="8E&W" & year==2010
replace sldu=37 if county=="Silver Bow" & precinct=="9E&W" & year==2010
replace sldu=38 if county=="Silver Bow" & precinct=="9N" & year==2010
replace sldu=30 if county=="Stillwater" & precinct=="1" & year==2010
replace sldu=30 if county=="Stillwater" & precinct=="10" & year==2010
replace sldu=30 if county=="Stillwater" & precinct=="11" & year==2010
replace sldu=30 if county=="Stillwater" & precinct=="13" & year==2010
replace sldu=30 if county=="Stillwater" & precinct=="2" & year==2010
replace sldu=30 if county=="Stillwater" & precinct=="4" & year==2010
replace sldu=30 if county=="Stillwater" & precinct=="7" & year==2010
replace sldu=30 if county=="Stillwater" & precinct=="9" & year==2010
replace sldu=31 if county=="Sweet Grass" & precinct=="1" & year==2010
replace sldu=31 if county=="Sweet Grass" & precinct=="2" & year==2010
replace sldu=31 if county=="Sweet Grass" & precinct=="3" & year==2010
replace sldu=31 if county=="Sweet Grass" & precinct=="4" & year==2010
replace sldu=30 if county=="Sweet Grass" & precinct=="5" & year==2010
replace sldu=9 if county=="Teton" & precinct=="1" & year==2010
replace sldu=9 if county=="Teton" & precinct=="11" & year==2010
replace sldu=9 if county=="Teton" & precinct=="17" & year==2010
replace sldu=9 if county=="Teton" & precinct=="6" & year==2010
replace sldu=9 if county=="Teton" & precinct=="7" & year==2010
replace sldu=14 if county=="Toole" & precinct=="DG4" & year==2010
replace sldu=14 if county=="Toole" & precinct=="DG4" & year==2010
replace sldu=8 if county=="Toole" & precinct=="KE1" & year==2010
replace sldu=8 if county=="Toole" & precinct=="KE3" & year==2010
replace sldu=14 if county=="Toole" & precinct=="SH1" & year==2010
replace sldu=14 if county=="Toole" & precinct=="SH6" & year==2010
replace sldu=14 if county=="Toole" & precinct=="SH6" & year==2010
replace sldu=8 if county=="Toole" & precinct=="SU1" & year==2010
replace sldu=8 if county=="Toole" & precinct=="SU3" & year==2010
replace sldu=14 if county=="Toole" & precinct=="SU3" & year==2010
replace sldu=22 if county=="Treasure" & precinct=="3" & year==2010
replace sldu=22 if county=="Treasure" & precinct=="4" & year==2010
replace sldu=22 if county=="Treasure" & precinct=="6" & year==2010
replace sldu=18 if county=="Valley" & precinct=="1" & year==2010
replace sldu=18 if county=="Valley" & precinct=="10" & year==2010
replace sldu=16 if county=="Valley" & precinct=="11" & year==2010
replace sldu=18 if county=="Valley" & precinct=="2" & year==2010
replace sldu=18 if county=="Valley" & precinct=="3" & year==2010
replace sldu=18 if county=="Valley" & precinct=="4" & year==2010
replace sldu=16 if county=="Valley" & precinct=="5" & year==2010
replace sldu=18 if county=="Valley" & precinct=="6" & year==2010
replace sldu=16 if county=="Valley" & precinct=="7" & year==2010
replace sldu=18 if county=="Valley" & precinct=="8" & year==2010
replace sldu=18 if county=="Valley" & precinct=="9" & year==2010
replace sldu=42 if county=="Wheatland" & precinct=="1" & year==2010
replace sldu=42 if county=="Wheatland" & precinct=="2" & year==2010
replace sldu=42 if county=="Wheatland" & precinct=="3" & year==2010
replace sldu=42 if county=="Wheatland" & precinct=="4" & year==2010
replace sldu=42 if county=="Wheatland" & precinct=="9" & year==2010
replace sldu=19 if county=="Wibaux" & precinct=="1" & year==2010
replace sldu=21 if county=="Yellowstone" & precinct=="1" & year==2010
replace sldu=23 if county=="Yellowstone" & precinct=="10" & year==2010
replace sldu=23 if county=="Yellowstone" & precinct=="11" & year==2010
replace sldu=23 if county=="Yellowstone" & precinct=="12" & year==2010
replace sldu=23 if county=="Yellowstone" & precinct=="13" & year==2010
replace sldu=23 if county=="Yellowstone" & precinct=="14" & year==2010
replace sldu=23 if county=="Yellowstone" & precinct=="15" & year==2010
replace sldu=23 if county=="Yellowstone" & precinct=="16" & year==2010
replace sldu=23 if county=="Yellowstone" & precinct=="17" & year==2010
replace sldu=24 if county=="Yellowstone" & precinct=="18" & year==2010
replace sldu=24 if county=="Yellowstone" & precinct=="19" & year==2010
replace sldu=22 if county=="Yellowstone" & precinct=="2" & year==2010
replace sldu=24 if county=="Yellowstone" & precinct=="20" & year==2010
replace sldu=24 if county=="Yellowstone" & precinct=="21" & year==2010
replace sldu=24 if county=="Yellowstone" & precinct=="22" & year==2010
replace sldu=24 if county=="Yellowstone" & precinct=="23" & year==2010
replace sldu=25 if county=="Yellowstone" & precinct=="24" & year==2010
replace sldu=25 if county=="Yellowstone" & precinct=="25" & year==2010
replace sldu=25 if county=="Yellowstone" & precinct=="26" & year==2010
replace sldu=25 if county=="Yellowstone" & precinct=="27" & year==2010
replace sldu=25 if county=="Yellowstone" & precinct=="28" & year==2010
replace sldu=25 if county=="Yellowstone" & precinct=="29" & year==2010
replace sldu=22 if county=="Yellowstone" & precinct=="3" & year==2010
replace sldu=25 if county=="Yellowstone" & precinct=="30" & year==2010
replace sldu=26 if county=="Yellowstone" & precinct=="31" & year==2010
replace sldu=26 if county=="Yellowstone" & precinct=="32" & year==2010
replace sldu=26 if county=="Yellowstone" & precinct=="33" & year==2010
replace sldu=26 if county=="Yellowstone" & precinct=="34" & year==2010
replace sldu=26 if county=="Yellowstone" & precinct=="35" & year==2010
replace sldu=26 if county=="Yellowstone" & precinct=="36" & year==2010
replace sldu=26 if county=="Yellowstone" & precinct=="37" & year==2010
replace sldu=26 if county=="Yellowstone" & precinct=="38" & year==2010
replace sldu=26 if county=="Yellowstone" & precinct=="39" & year==2010
replace sldu=22 if county=="Yellowstone" & precinct=="4" & year==2010
replace sldu=27 if county=="Yellowstone" & precinct=="40" & year==2010
replace sldu=27 if county=="Yellowstone" & precinct=="41" & year==2010
replace sldu=27 if county=="Yellowstone" & precinct=="42" & year==2010
replace sldu=27 if county=="Yellowstone" & precinct=="43" & year==2010
replace sldu=27 if county=="Yellowstone" & precinct=="44" & year==2010
replace sldu=27 if county=="Yellowstone" & precinct=="45" & year==2010
replace sldu=27 if county=="Yellowstone" & precinct=="46" & year==2010
replace sldu=27 if county=="Yellowstone" & precinct=="47" & year==2010
replace sldu=27 if county=="Yellowstone" & precinct=="48" & year==2010
replace sldu=27 if county=="Yellowstone" & precinct=="49" & year==2010
replace sldu=22 if county=="Yellowstone" & precinct=="5" & year==2010
replace sldu=28 if county=="Yellowstone" & precinct=="50" & year==2010
replace sldu=28 if county=="Yellowstone" & precinct=="51" & year==2010
replace sldu=28 if county=="Yellowstone" & precinct=="52" & year==2010
replace sldu=28 if county=="Yellowstone" & precinct=="53" & year==2010
replace sldu=28 if county=="Yellowstone" & precinct=="54" & year==2010
replace sldu=28 if county=="Yellowstone" & precinct=="55" & year==2010
replace sldu=28 if county=="Yellowstone" & precinct=="56" & year==2010
replace sldu=28 if county=="Yellowstone" & precinct=="57" & year==2010
replace sldu=28 if county=="Yellowstone" & precinct=="58" & year==2010
replace sldu=29 if county=="Yellowstone" & precinct=="59" & year==2010
replace sldu=22 if county=="Yellowstone" & precinct=="6" & year==2010
replace sldu=29 if county=="Yellowstone" & precinct=="60" & year==2010
replace sldu=29 if county=="Yellowstone" & precinct=="61" & year==2010
replace sldu=29 if county=="Yellowstone" & precinct=="62" & year==2010
replace sldu=29 if county=="Yellowstone" & precinct=="63" & year==2010
replace sldu=29 if county=="Yellowstone" & precinct=="64" & year==2010
replace sldu=29 if county=="Yellowstone" & precinct=="65" & year==2010
replace sldu=29 if county=="Yellowstone" & precinct=="66" & year==2010
replace sldu=29 if county=="Yellowstone" & precinct=="67" & year==2010
replace sldu=29 if county=="Yellowstone" & precinct=="68" & year==2010
replace sldu=29 if county=="Yellowstone" & precinct=="69" & year==2010
replace sldu=22 if county=="Yellowstone" & precinct=="7" & year==2010
replace sldu=23 if county=="Yellowstone" & precinct=="8" & year==2010
replace sldu=23 if county=="Yellowstone" & precinct=="9" & year==2010
